Admin
Exam Builder
Pick problems from the bank — your exam takes shape on the right.
69/69
Diff
Any
easy
medium
hard
Selected only
Topic
All
Arrays
13
Strings
9
Objects
5
Logic
6
React
6
TypeScript
12
Python
6
PostgreSQL
6
Prisma
6
Select all (69)
Filter Active Users
easy
Complete getActiveUsers so it returns only users whose active property is true.
Arrays · ~5m
Preview
Count Employees by Role
easy
Complete countEmployeesByRole so it returns an object mapping each role to the number of employees with that role.
Objects · ~5m
Preview
Find Employee by ID
easy
Complete findEmployeeById so it returns the employee with the matching id, or undefined when no employee matches.
Arrays · ~5m
Preview
Remove Duplicate Numbers
easy
Complete removeDuplicates so it returns a new array containing only unique numbers, keeping the original order.
Arrays · ~5m
Preview
Calculate Average Score
easy
Complete calculateAverage so it returns the average of all scores.
Arrays · ~5m
Preview
Reverse a String
easy
Complete reverseString so it returns the input string reversed.
Strings · ~5m
Preview
Check for Palindrome
easy
Complete isPalindrome so it returns true when the string reads the same forwards and backwards (case-insensitive).
Strings · ~5m
Preview
Sum of Even Numbers
easy
Complete sumEvens so it returns the sum of all even numbers in the array.
Arrays · ~5m
Preview
FizzBuzz
easy
Complete fizzBuzz so it returns an array from 1 to n where multiples of 3 are "Fizz", multiples of 5 are "Buzz", and multiples of both are "FizzBuzz".
Logic · ~5m
Preview
Group Products by Category
medium
Complete groupByCategory so it returns an object mapping each category to an array of product names in that category.
Objects · ~8m
Preview
Flatten a Nested Array
medium
Complete flatten so it returns a single-level array from an array nested to any depth.
Arrays · ~8m
Preview
Chunk an Array
medium
Complete chunk so it splits the array into groups of the given size. The final group may be smaller.
Arrays · ~8m
Preview
Sort Employees by Age
medium
Complete sortByAge so it returns a new array of employees sorted by age ascending. Do not mutate the input array.
Arrays · ~8m
Preview
Count Vowels
easy
Complete countVowels so it returns the number of vowels (a, e, i, o, u) in the string, case-insensitive.
Strings · ~5m
Preview
Find the Longest Word
medium
Complete longestWord so it returns the longest word in the sentence. If several words tie, return the first one.
Strings · ~8m
Preview
Capitalize Each Word
easy
Complete capitalizeWords so it returns the sentence with the first letter of every word uppercased.
Strings · ~5m
Preview
Find Min and Max
easy
Complete minMax so it returns an object with the smallest and largest numbers, e.g. { min: 1, max: 9 }.
Arrays · ~5m
Preview
Count Character Occurrences
medium
Complete charCount so it returns an object mapping each character in the string to how many times it appears.
Strings · ~8m
Preview
Sum Nested Values
medium
Complete totalCartPrice so it returns the total price of the cart: sum of price × quantity for every item.
Objects · ~8m
Preview
Merge Two Sorted Arrays
medium
Complete mergeSorted so it merges two arrays that are already sorted ascending into one sorted array.
Arrays · ~8m
Preview
Check Anagrams
medium
Complete isAnagram so it returns true when the two strings contain exactly the same letters (case-insensitive).
Strings · ~8m
Preview
Pluck a Property
easy
Complete pluck so it returns an array of the given property's value from every object.
Objects · ~5m
Preview
Two Sum
hard
Complete twoSum so it returns the indices of the two numbers that add up to the target, as [i, j] with i < j. Assume exactly one solution exists.
Logic · ~12m
Preview
Balanced Brackets
hard
Complete isBalanced so it returns true when every opening bracket ( [ { has a matching closing bracket in the correct order.
Logic · ~12m
Preview
Running Total
hard
Complete runningTotal so it returns an array where each element is the sum of all numbers up to and including that position.
Logic · ~12m
Preview
Fibonacci Sequence
medium
Complete fibonacci so it returns an array with the first n Fibonacci numbers, starting 0, 1.
Logic · ~8m
Preview
Title from Slug
easy
Complete unslug so it converts a-slug-like-this into "A Slug Like This".
Strings · ~5m
Preview
Greeting Component
easy
Complete the Greeting component so it renders an <h1> saying "Hello, <name>!" using the name prop.
React · ~5m
Preview
Item Counter Label
easy
Complete CartSummary so it renders "<n> items in cart" where n is the length of the items prop array.
React · ~5m
Preview
Conditional Status Badge
easy
Complete StatusBadge so it renders "Online" when the active prop is true and "Offline" when it is false.
React · ~5m
Preview
Render a User List
medium
Complete UserList so it renders a <ul> with one <li> per user showing the user's name.
React · ~8m
Preview
Click Counter
medium
Complete Counter so it renders "Count: <n>" and a <button> labeled "+" that increments the count on every click. Start at 0. Use the useState hook (available as React.useState).
React · ~8m
Preview
Show / Hide Toggle
hard
Complete Toggle so it renders a <button> labeled "Toggle" and a message that switches between "Visible" and "Hidden" on each click. Start with "Visible". Use React.useState.
React · ~12m
Preview
Active Users
easy
Write a query that returns the id, name, and active status of active users. Order the rows by id.
PostgreSQL · ~5m
Preview
Orders for Customer
easy
Write a query that returns the id and total of every order placed by the customer named Maria. Order the rows by order id.
PostgreSQL · ~5m
Preview
Count by Status
medium
Write a query that groups tickets by status and returns each status with its count as an integer column named count. Order the rows by status.
PostgreSQL · ~8m
Preview
Recent Posts
medium
Write a query that returns the id, title, and published_at date of posts published on or after 2024-01-01. Order newest posts first.
PostgreSQL · ~8m
Preview
Insert Returning
medium
Insert a product with id 1, name Mug, and price 9.5. Return the inserted row's id, name, and price.
PostgreSQL · ~8m
Preview
Join and Filter
medium
Write a query that returns each customer name and matching order id for orders with a total greater than 100. Name the order id column order_id and order the rows by order id.
PostgreSQL · ~8m
Preview
Unique User Email
easy
Write a Prisma schema with a User model. It must have an Int id marked @id and a String email marked @unique.
Prisma · ~5m
Preview
User–Post 1-n
medium
Write User and Post models for a one-to-many relationship. User needs posts Post[]. Post needs authorId Int and author User with @relation(fields: [authorId], references: [id]).
Prisma · ~8m
Preview
Role Enum
medium
Write a Role enum with USER and ADMIN values, then add a User model with a role field of type Role.
Prisma · ~8m
Preview
Active Users Args
easy
Return the arguments object for prisma.user.findMany(...) that selects active users.
Prisma · ~5m
Preview
Posts With Author
medium
Return the arguments object for prisma.post.findMany(...) that selects published posts and includes each post's author.
Prisma · ~8m
Preview
Create Post Connect
medium
Return the arguments object for prisma.post.create(...) that creates a post titled "Hi" and connects it to the author with id 1.
Prisma · ~8m
Preview
Filter Active Users
easy
Complete get_active_users so it returns only users whose active property is true.
Python · ~5m
Preview
Word Lengths
easy
Complete word_lengths so it returns a list containing the length of each word.
Python · ~5m
Preview
Group by Category
medium
Complete group_by_category so it returns a dict mapping each category to a list of product names in that category.
Python · ~8m
Preview
Is Palindrome
medium
Complete is_palindrome so it ignores non-alphanumeric characters and case when checking whether text is a palindrome.
Python · ~8m
Preview
Top N Frequencies
medium
Complete top_n_frequencies so it returns the top n [word, count] pairs ordered by count descending, then word ascending for ties.
Python · ~8m
Preview
Flatten Nested Lists
hard
Complete flatten so it recursively flattens nested lists into a flat list of integers.
Python · ~12m
Preview
Typed Active Users
easy
Complete getActiveUsers so it returns only users whose active property is true. Use the provided User type.
TypeScript · ~5m
Preview
Pluck Property
easy
Complete pluck so it returns an array of the given key's values from each item. The generic signature is already provided.
TypeScript · ~5m
Preview
Api Result Message
medium
Complete getMessage so it returns data when status is ok and message when status is error.
TypeScript · ~8m
Preview
Count By Role
medium
Complete countByRole so it returns an object mapping each role to how many employees have that role.
TypeScript · ~8m
Preview
Parse User Id
easy
Complete parseUserId so it returns a number whether the input is a numeric string or already a number.
TypeScript · ~5m
Preview
Omit Email
medium
Complete omitEmail so it returns each user without the email field. Use the provided User type.
TypeScript · ~8m
Preview
Format Full Name
easy
Complete formatFullName so it returns a single display name from first and last. Trim each part, join with one space, and omit empty parts. If both are empty after trim, return an empty string.
Strings · ~5m
Preview
Pick Completed Tasks
easy
Complete getCompletedTitles so it returns the title of every task whose done property is true, in the same order as the input.
Arrays · ~5m
Preview
Build Query String
easy
Complete buildQueryString so it turns a plain object into a query string like `a=1&b=x`. Skip keys whose value is null or undefined. Convert other values with String(...). Do not add a leading `?`. Key order may follow Object.keys order.
Objects · ~5m
Preview
Unique Tags
easy
Complete uniqueTags so it flattens an array of tag arrays into one list of unique tags, preserving first-seen order.
Arrays · ~5m
Preview
Apply Discount
easy
Complete applyDiscount so it returns price after a percent discount, rounded to 2 decimal places. Example: price 100 and percent 15 → 85.
Logic · ~5m
Preview
Newest Messages First
easy
Complete sortMessagesNewestFirst so it returns a new array of messages sorted by createdAt descending (newest first). Do not mutate the input array. createdAt values are ISO date strings.
Arrays · ~5m
Preview
Typed Format Full Name
easy
Complete formatFullName so it returns a display name from a Person. Trim each part, join with one space, and omit empty parts.
TypeScript · ~5m
Preview
Active Product Names
easy
Complete getInStockNames so it returns the names of products where inStock is true, in input order.
TypeScript · ~5m
Preview
Merge Settings
easy
Complete mergeSettings so it returns a full Settings object by shallow-merging defaults with overrides. Override keys win when provided.
TypeScript · ~5m
Preview
Safe Divide
easy
Complete safeDivide so it returns a / b as a number, or null when b is 0.
TypeScript · ~5m
Preview
Label By Status
easy
Complete statusLabel so it maps OrderStatus to a display string: pending → "Pending", shipped → "Shipped", cancelled → "Cancelled".
TypeScript · ~5m
Preview
Paginate Items
easy
Complete paginate so it returns a 1-based page slice of items. pageSize is how many items per page. If the page is out of range, return an empty array. Do not mutate the input.
TypeScript · ~5m
Preview