QA & SDET interview practice
New programs every monthCoding Rounds
120 Java interview programs, plus JavaScript, TypeScript, SQL and automation. Pick a track. Solve a real coding problem. Build your interview confidence.
Basic programs are freeIntermediate & Advanced: ₹99/month

- 206
- Programs
- 120
- Java programs
- 0
- Solved by you
- 0/100
- Your best average
Interview program library
Choose a track, difficulty and access level.
- Free
Reverse a string without reverse()
Write reverseString(str) that returns the string reversed.JavaScriptBasicStrings5 minOpen program - Free
Check if a string is a palindrome
Write isPalindrome(str) that returns true if the string reads the same forwards and backwards.JavaScriptBasicStrings7 minOpen program - Free
Count occurrences of each character
Write charCount(str) that returns an object mapping each character to how many times it appears.JavaScriptBasicStrings8 minOpen program - Free
Find duplicate elements in an array
Write findDuplicates(arr) that returns an array of values that appear more than once.JavaScriptBasicArrays7 minOpen program - Free
Find the second largest number
Write secondLargest(nums) that returns the second largest distinct number.JavaScriptBasicArrays8 minOpen program - Free
Check if two strings are anagrams
Write isAnagram(a, b) returning true if both strings contain the same letters in any order.JavaScriptBasicStrings7 minOpen program - Free
First non-repeating character
Write firstUnique(str) returning the first character that appears exactly once.JavaScriptBasicStrings8 minOpen program - Free
Find the missing number from 1 to n
An array contains numbers from 1 to n with exactly one missing. Write missingNumber(arr) to return it.JavaScriptBasicArrays6 minOpen program - Free
Remove duplicates while keeping order
Write unique(arr) that returns a new array without duplicates, keeping first occurrences in order.JavaScriptBasicArrays5 minOpen program - Free
Flatten a nested array
Write flatten(arr) that flattens any depth of nesting. Do not use Array.prototype.flat.JavaScriptBasicArrays8 minOpen program - Free
Group API responses by status code
You get an array of API responses like { url, status }.JavaScriptBasicAPI data8 minOpen program - Free
Validate an API user response (TypeScript)
Define a User type with id: number, email: string and active: boolean.TypeScriptBasicAPI data10 minOpen program - Free
Second highest salary
Using the employees table, return the second highest distinct salary as a single column named salary.SQLBasicAggregation6 minOpen program - Free
Find duplicate customer emails
Return every email that belongs to more than one customer, with the number of customers as cnt.SQLBasicData quality6 minOpen program - Free
Customers who never placed an order
Return id and name of customers that have no rows in orders.SQLBasicJoins7 minOpen program - Free
Employees earning above their team average
Return name, team and salary of every employee whose salary is higher than the average salary of their own team.SQLBasicSubqueries8 minOpen program - Free
Count open bugs by severity
From bugs, count bugs whose status is not 'Closed', grouped by severity.SQLBasicAggregation5 minOpen program - Free
Failed tests per suite
From test_runs, return each suite with total runs and failed runs (status = 'failed').SQLBasicAggregation6 minOpen program - Free
Find records with missing emails
Return id and name of customers whose email is NULL or an empty string.SQLBasicData quality4 minOpen program - Free
Total spend per customer
Return each customer's name and total_spent (sum of order totals) for customers with at least one order.SQLBasicJoins7 minOpen program - Free
Orders with no payment record
Return id and status of orders that have no row in payments.SQLBasicData quality6 minOpen program - Pro · ₹99/mo
Group test results by status
Write groupByStatus(results) where each result is { name, status }.JavaScriptIntermediateObjects10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Retry a flaky async function
Write retry(fn, attempts) that calls the async function fn until it resolves.JavaScriptIntermediateAsync12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Deep equality check for API responses
Write deepEqual(a, b) returning true when two JSON-like values (objects, arrays, primitives, null) are structurally equal.JavaScriptIntermediateObjects15 minUnlock practice · ₹99/month - Pro · ₹99/mo
Parse a URL query string
Write parseQuery(url) returning an object of query parameters.JavaScriptIntermediateStrings10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Top K most frequent error messages
Write topErrors(logs, k) returning the k most frequent messages.JavaScriptIntermediateMaps12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Implement debounce
Write debounce(fn, ms) returning a function that delays calling fn until ms have passed since the last call.JavaScriptAdvancedAsync15 minUnlock practice · ₹99/month - Pro · ₹99/mo
Run async tasks with a concurrency limit
Write runPool(tasks, limit) where tasks is an array of functions returning promises.JavaScriptAdvancedAsync20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Validate a paginated API response
Write validatePage(body: unknown): string[] for a response shaped { page: number, total: number, items: { id: number, email: string }[] }.TypeScriptIntermediateTypes12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Build a test-data builder
Write userBuilder() returning an object with chainable withName(n), withRole(r), inactive() and build().TypeScriptAdvancedPatterns15 minUnlock practice · ₹99/month - Pro · ₹99/mo
Third-highest distinct salary with DENSE_RANK
Return the name and salary of every employee earning the **third-highest distinct** salary, using a window function.SQLIntermediateWindow functions8 minUnlock practice · ₹99/month - Pro · ₹99/mo
Highest-paid employee in each team
Return team, name and salary of the top earner(s) in each team.SQLIntermediateWindow functions10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Average days to close bugs per module
For closed bugs (closed_at not null), return module and avg_days — average days between created_at and closed_at, rounded to 1 decimal.SQLIntermediateDates10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Find flaky tests
A test is flaky if it has **both** a passed and a failed run in test_runs.SQLAdvancedAggregation12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Running total of daily revenue
Using successful payments (status = 'CAPTURED'), return day (date part of paid_at), revenue for that day and running_total, both rounded to 2 decimals.SQLAdvancedWindow functions12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Orders whose payments don't match the total
Return order_id, total and paid (sum of CAPTURED payment amounts) for orders where paid differs from total by more than 0.01.SQLAdvancedData quality12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Split an array into batches
Write chunk(arr, size) that splits an array into groups of size. The last group may be smaller.JavaScriptIntermediateArrays8 minUnlock practice · ₹99/month - Pro · ₹99/mo
Longest substring without repeating characters
Write longestUnique(s) returning the length of the longest substring with no repeated characters.JavaScriptIntermediateStrings15 minUnlock practice · ₹99/month - Pro · ₹99/mo
Validate balanced brackets
Write isBalanced(s) returning true if every (), [] and {} is closed in the right order. Ignore other characters.JavaScriptIntermediateStacks10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Rotate an array by k steps
Write rotate(arr, k) returning a new array rotated right by k (k may be larger than the length).JavaScriptIntermediateArrays8 minUnlock practice · ₹99/month - Pro · ₹99/mo
Two sum
Write twoSum(nums, target) returning the indices [i, j] (i < j) of two numbers that add up to target, or [] if none.JavaScriptIntermediateMaps10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Merge two sorted arrays
Write mergeSorted(a, b) merging two ascending arrays into one ascending array without calling sort().JavaScriptIntermediateArrays10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Mask emails and card numbers in logs
Write mask(line) that replaces every email's user part with *** (keep the domain) and every 16-digit card number with **** **** **** plus its last 4 digits.JavaScriptIntermediateRegex12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Compare version numbers
Write compareVersions(a, b) returning 1 if a > b, -1 if a < b, 0 if equal. Missing parts count as 0 ("1.0" equals "1.0.0").JavaScriptIntermediateStrings10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Diff two API responses
Write diffKeys(oldObj, newObj) returning { added, removed, changed } — arrays of dotted key paths, each sorted alphabetically.JavaScriptAdvancedObjects18 minUnlock practice · ₹99/month - Pro · ₹99/mo
Memoize an expensive function
Write memoize(fn) returning a function that caches results by its arguments (use JSON.stringify(args) as the key).JavaScriptAdvancedClosures12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Build a tiny event emitter
Write a class Emitter with on(event, fn), off(event, fn) and emit(event, ...args).JavaScriptAdvancedPatterns15 minUnlock practice · ₹99/month - Pro · ₹99/mo
Poll until a condition is true
Write waitUntil(check, { timeout, interval }) that calls check() (may be async) every interval ms.JavaScriptAdvancedAsync15 minUnlock practice · ₹99/month - Pro · ₹99/mo
Implement an LRU cache
Write a class LRUCache(capacity) with get(key) (returns value or -1) and put(key, value).JavaScriptAdvancedData structures20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Generic groupBy
Write a generic groupBy<T>(items: T[], key: (item: T) => string): Record<string, T[]>.TypeScriptIntermediateGenerics10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Parse test environment config safely
Write parseConfig(env: Record<string, string | undefined>) returning { baseUrl: string; retries: number; headless: boolean }.TypeScriptIntermediateTypes12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Result type for safe API calls
Write safe<T>(fn: () => Promise<T>) that resolves to { ok: true, value } on success or { ok: false, error } (the error message string) on failure. It must never reject.TypeScriptAdvancedTypes15 minUnlock practice · ₹99/month - Pro · ₹99/mo
Order count and revenue by status
Return status, orders (count) and revenue (sum of total, rounded to 2) for each order status, sorted by orders descending then status.SQLIntermediateAggregation6 minUnlock practice · ₹99/month - Pro · ₹99/mo
Products never ordered
Return id and name of products that never appear in order_items, sorted by id.SQLIntermediateJoins7 minUnlock practice · ₹99/month - Pro · ₹99/mo
Orders whose items don't add up
Return order_id, total and items_total (sum of quantity × unit_price, rounded to 2) where they differ by more than 0.01. Sort by order_id.SQLAdvancedData quality12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Units sold per category
Return category and units (total quantity sold across order_items) sorted by units descending, then category.SQLIntermediateJoins8 minUnlock practice · ₹99/month - Pro · ₹99/mo
Employee with manager name (self join)
Return employee and manager names for every employee (manager is NULL for those without one). Sort by employee.SQLIntermediateJoins8 minUnlock practice · ₹99/month - Pro · ₹99/mo
Open high-severity bugs per module
Count bugs that are not closed (closed_at IS NULL) with severity Critical or High, per module. Return module and open_bugs, sorted by open_bugs descending then module.SQLIntermediateFiltering7 minUnlock practice · ₹99/month - Pro · ₹99/mo
Pass rate per test suite
Return suite, runs and pass_rate (percentage of runs with status passed, rounded to 1 decimal), sorted by pass_rate ascending then suite.SQLIntermediateAggregation8 minUnlock practice · ₹99/month - Pro · ₹99/mo
Slowest test in each suite
Return suite, test_name and duration_ms of the single slowest run in each suite (ties: alphabetically first test_name). Sort by suite.SQLAdvancedWindow functions10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Each customer's latest order
Return customer_id, order_id and created_at of each customer's most recent order (ties: highest order id). Sort by customer_id.SQLAdvancedWindow functions10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Duplicate product lines in an order
Find orders where the same product appears on more than one line. Return order_id, product_id and lines, sorted by order_id then product_id.SQLIntermediateData quality7 minUnlock practice · ₹99/month - Pro · ₹99/mo
Orders pointing to missing customers
Return id and customer_id of orders whose customer_id has no row in customers. Sort by id.SQLIntermediateData quality6 minUnlock practice · ₹99/month - Pro · ₹99/mo
Salary difference from team average
Return name, team, salary and diff (salary minus the team's average salary, rounded to 0 decimals). Sort by team, then diff descending, then name.SQLAdvancedWindow functions10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Day-over-day order change
Return day (date part of created_at), orders and change (orders minus the previous day's orders; NULL for the first day). Sort by day.SQLAdvancedWindow functions14 minUnlock practice · ₹99/month - Pro · ₹99/mo
Most active users in the audit log
Return changed_by, changes (count) and last_change (latest changed_at) per user, sorted by changes descending then changed_by.SQLIntermediateAggregation7 minUnlock practice · ₹99/month - Pro · ₹99/mo
Deactivated customers who still ordered
Return id, name and orders (count) for customers with is_active = 0 or a non-null deleted_at who have at least one order. Sort by id.SQLAdvancedData quality9 minUnlock practice · ₹99/month - Free
Playwright: log in with user-facing locators
page is a Playwright-style page. Write login(page, user, pass) that fills the **Username** and **Password** fields (find them by label) and clicks the **Sign in** button (find it by role).PlaywrightBasicLocators6 minOpen program - Pro · ₹99/mo
Playwright: read the error message
Write loginError(page, user, pass): log in like before, then return the text of the **alert** that appears, or null if login succeeded (the URL becomes /dashboard).PlaywrightIntermediateAssertions8 minUnlock practice · ₹99/month - Pro · ₹99/mo
Playwright: extract data from a table
Each table row has role row and text like "Asha | Admin | Active" (the first row is the header).PlaywrightIntermediateTables10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Playwright: click a button inside the right row
Every row has its own **Delete** button, so getByRole('button', { name: 'Delete' }) matches several elements and fails in strict mode.PlaywrightIntermediateLocators10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Playwright: catch a toast without sleeping
Clicking **Save** shows a toast (role status) after ~200 ms that disappears ~600 ms later.PlaywrightIntermediateWaits8 minUnlock practice · ₹99/month - Pro · ₹99/mo
Playwright: verify the cart total
Line prices have test id price (text like "₹1,299"), and the displayed total has test id total.PlaywrightIntermediateAssertions10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Playwright: write a Page Object
Write a class LoginPage with constructor(page), goto() (opens /login), login(user, pass) and errorText() (text of the alert, or null if none is visible).PlaywrightAdvancedPage Object Model15 minUnlock practice · ₹99/month - Pro · ₹99/mo
Playwright: collect items across pages
A list shows items (test id item) and a **Next** button that becomes disabled on the last page.PlaywrightAdvancedPagination15 minUnlock practice · ₹99/month - Free
API: health-check endpoint
request works like Playwright's APIRequestContext (get, post, ... returning a response with status(), ok(), json(), headers()).API testingBasicStatus codes5 minOpen program - Pro · ₹99/mo
API: create a user and verify it
Write createAndVerify(request, user): POST /users with data: user (expect 201, body has id), then GET /users/{id}.API testingIntermediateCRUD10 minUnlock practice · ₹99/month - Pro · ₹99/mo
API: log in and call a protected endpoint
POST /auth/login with data: { username, password } returns { token }.API testingIntermediateAuthentication10 minUnlock practice · ₹99/month - Pro · ₹99/mo
API: fetch every page of results
GET /orders?page=N (N starts at 1) returns { items: [...], hasMore: boolean }.API testingIntermediatePagination12 minUnlock practice · ₹99/month - Pro · ₹99/mo
API: retry on rate limiting
Write getWithRetry(request, url, maxAttempts) that retries while the response status is 429 or 503, up to maxAttempts total calls.API testingAdvancedResilience12 minUnlock practice · ₹99/month - Pro · ₹99/mo
API: validate a response against a schema
Write validate(value, schema, path = "$") returning an array of error strings.API testingAdvancedContract testing18 minUnlock practice · ₹99/month - Free
Framework: load CSV test data
Write parseCsv(text) turning CSV text (first line = headers) into an array of objects. Trim cells and skip empty lines. No quoted commas.Framework designBasicData-driven tests8 minOpen program - Pro · ₹99/mo
Framework: environment config with overrides
Write getConfig(env, configs) where configs = { base: {...}, qa: {...}, staging: {...} }.Framework designIntermediateConfiguration12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Framework: summarise a test run
Results are { title, status: "passed" | "failed" | "skipped", retries }.Framework designIntermediateReporting10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Framework: filter tests by tags
Tests are { title, tags: ["@smoke", ...] }. Write selectTests(tests, expr) returning matching titles.Framework designAdvancedTest selection15 minUnlock practice · ₹99/month - Pro · ₹99/mo
Framework: fixtures with setup and teardown
Write runTests(tests, fixtures) where fixtures[name] = { setup: async () => value, teardown: async (value) => {} } and each test is { title, uses: [names], fn: async (ctx) => {} }.Framework designAdvancedFixtures18 minUnlock practice · ₹99/month - Free
Java: reverse a string without StringBuilder.reverse()
Write static String reverse(String s) that returns the string reversed.JavaBasicStrings5 minOpen program - Free
Java: count vowels in a string
Write static int countVowels(String s) returning how many vowels (a, e, i, o, u, any case) the string contains.JavaBasicStrings5 minOpen program - Free
Java: second largest number in an array
Write static int secondLargest(int[] a) returning the second largest distinct value.JavaBasicArrays7 minOpen program - Free
Java: character frequency with a Map
Write static Map<Character, Integer> frequency(String s) counting each character, ignoring spaces.JavaBasicCollections8 minOpen program - Pro · ₹99/mo
Java: check if two strings are anagrams
Write static boolean isAnagram(String a, String b). Ignore case and spaces.JavaIntermediateStrings8 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: first non-repeating character
Write static char firstUnique(String s) returning the first character that appears once.JavaIntermediateCollections8 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: remove duplicates keeping order
Write static List<Integer> dedupe(List<Integer> in) returning the values without duplicates, keeping first-seen order.JavaIntermediateCollections6 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java Streams: names of failed tests
Each result is a string like "login:PASS" or "search:FAIL".JavaIntermediateStreams8 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: balanced brackets with a stack
Write static boolean balanced(String s) returning true when every (, [ and { is closed in the right order. Ignore other characters.JavaIntermediateStacks10 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: group test cases by status
Input strings look like "TC1:PASS".JavaAdvancedStreams12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: retry a flaky action
Write static <T> T retry(java.util.function.Supplier<T> action, int attempts) that calls action until it succeeds, up to attempts times.JavaAdvancedFramework utilities12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: LRU cache
Write static List<String> simulate(int capacity, String[] ops) for an LRU cache.JavaAdvancedCollections15 minUnlock practice · ₹99/month - Free
Java: check a palindrome string
Implement static boolean palindrome(String s).JavaBasicStrings8 minOpen program - Free
Java: reverse word order
Implement static String reverseWords(String s).JavaBasicStrings8 minOpen program - Free
Java: remove whitespace
Implement static String removeWhitespace(String s).JavaBasicStrings8 minOpen program - Free
Java: count words
Implement static int countWords(String s).JavaBasicStrings8 minOpen program - Free
Java: count digits in text
Implement static int countDigits(String s).JavaBasicStrings8 minOpen program - Free
Java: toggle letter case
Implement static String toggleCase(String s).JavaBasicStrings8 minOpen program - Pro · ₹99/mo
Java: remove duplicate characters
Implement static String uniqueChars(String s).JavaIntermediateStrings12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find the most frequent character
Implement static char mostFrequent(String s).JavaIntermediateStrings12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: check string rotation
Implement static boolean rotation(String a, String b).JavaIntermediateStrings12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find the longest common prefix
Implement static String commonPrefix(String[] a).JavaIntermediateStrings12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: run-length encode a string
Implement static String compress(String s).JavaIntermediateStrings12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: longest substring without repeating characters
Implement static int longestUnique(String s).JavaAdvancedSliding window20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find the longest palindromic substring
Implement static String longestPalindrome(String s).JavaAdvancedStrings20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: count overlapping substring occurrences
Implement static int occurrences(String s, String needle).JavaIntermediateStrings12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: validate signed integer text
Implement static boolean validInteger(String s).JavaIntermediateStrings12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: check a subsequence
Implement static boolean subsequence(String small, String large).JavaIntermediateStrings12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: group anagrams deterministically
Implement static List<List<String>> groupAnagrams(String[] words).JavaAdvancedCollections20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: count word frequency
Implement static Map<String,Integer> wordFrequency(String s).JavaIntermediateCollections12 minUnlock practice · ₹99/month - Free
Java: replace spaces with percent-20
Implement static String encodeSpaces(String s).JavaBasicStrings8 minOpen program - Pro · ₹99/mo
Java: reverse each word in place
Implement static String reverseEachWord(String s).JavaIntermediateStrings12 minUnlock practice · ₹99/month - Free
Java: check a prime number
Implement static boolean prime(int n).JavaBasicNumbers8 minOpen program - Free
Java: calculate factorial
Implement static long factorial(int n).JavaBasicNumbers8 minOpen program - Free
Java: find the nth Fibonacci number
Implement static long fibonacci(int n).JavaBasicNumbers8 minOpen program - Free
Java: sum integer digits
Implement static int digitSum(int n).JavaBasicNumbers8 minOpen program - Pro · ₹99/mo
Java: reverse integer digits safely
Implement static int reverseInt(int n).JavaIntermediateNumbers12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: check an Armstrong number
Implement static boolean armstrong(int n).JavaIntermediateNumbers12 minUnlock practice · ₹99/month - Free
Java: greatest common divisor
Implement static long gcd(int a, int b).JavaBasicNumbers8 minOpen program - Pro · ₹99/mo
Java: least common multiple
Implement static long lcm(int a, int b).JavaIntermediateNumbers12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: check a perfect number
Implement static boolean perfect(int n).JavaIntermediateNumbers12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: check a happy number
Implement static boolean happy(int n).JavaIntermediateNumbers12 minUnlock practice · ₹99/month - Free
Java: check a power of two
Implement static boolean powerOfTwo(int n).JavaBasicBit manipulation8 minOpen program - Pro · ₹99/mo
Java: count set bits
Implement static int setBits(int n).JavaIntermediateBit manipulation12 minUnlock practice · ₹99/month - Free
Java: convert decimal to binary
Implement static String binary(int n).JavaBasicNumbers8 minOpen program - Pro · ₹99/mo
Java: list primes up to n
Implement static List<Integer> primes(int n).JavaIntermediateNumbers12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: count trailing zeros in factorial
Implement static int trailingZeros(int n).JavaIntermediateNumbers12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: calculate integer square root
Implement static int sqrtFloor(int n).JavaIntermediateBinary search12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: exponentiation by squaring
Implement static double power(double x, int n).JavaAdvancedNumbers20 minUnlock practice · ₹99/month - Free
Java: check a leap year
Implement static boolean leapYear(int year).JavaBasicNumbers8 minOpen program - Free
Java: check a numeric palindrome
Implement static boolean numericPalindrome(int n).JavaBasicNumbers8 minOpen program - Pro · ₹99/mo
Java: calculate the digital root
Implement static int digitalRoot(int n).JavaIntermediateNumbers12 minUnlock practice · ₹99/month - Free
Java: sum an integer array
Implement static long sum(int[] a).JavaBasicArrays8 minOpen program - Free
Java: find the array maximum
Implement static int maximum(int[] a).JavaBasicArrays8 minOpen program - Free
Java: reverse an array copy
Implement static int[] reversed(int[] a).JavaBasicArrays8 minOpen program - Pro · ₹99/mo
Java: rotate an array right
Implement static int[] rotate(int[] a, int k).JavaIntermediateArrays12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: move zeros to the end
Implement static int[] moveZeros(int[] a).JavaIntermediateArrays12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find missing number from zero to n
Implement static int missing(int[] a).JavaIntermediateArrays12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find sorted duplicate values
Implement static List<Integer> duplicates(int[] a).JavaIntermediateArrays12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find a unique sorted intersection
Implement static List<Integer> intersection(int[] a, int[] b).JavaIntermediateArrays12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find a unique sorted union
Implement static List<Integer> union(int[] a, int[] b).JavaIntermediateArrays12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: merge two sorted arrays
Implement static int[] merge(int[] a, int[] b).JavaIntermediateArrays12 minUnlock practice · ₹99/month - Free
Java: binary search a sorted array
Implement static int binarySearch(int[] a, int target).JavaBasicBinary search8 minOpen program - Pro · ₹99/mo
Java: find two-sum indices
Implement static int[] twoSum(int[] a, int target).JavaIntermediateHash maps12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: maximum contiguous subarray sum
Implement static long maxSubarray(int[] a).JavaAdvancedArrays20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: product of array except self
Implement static long[] productExceptSelf(int[] a).JavaAdvancedArrays20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find the majority element
Implement static int majority(int[] a).JavaIntermediateArrays12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find kth largest with duplicates
Implement static int kthLargest(int[] a, int k).JavaAdvancedArrays20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find array leaders
Implement static List<Integer> leaders(int[] a).JavaIntermediateArrays12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find an equilibrium index
Implement static int equilibrium(int[] a).JavaIntermediateArrays12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: maximum single-trade stock profit
Implement static int stockProfit(int[] prices).JavaIntermediateArrays12 minUnlock practice · ₹99/month - Free
Java: bubble sort a copy
Implement static int[] bubbleSort(int[] a).JavaBasicSorting8 minOpen program - Pro · ₹99/mo
Java: insertion sort a copy
Implement static int[] insertionSort(int[] a).JavaIntermediateSorting12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: selection sort a copy
Implement static int[] selectionSort(int[] a).JavaIntermediateSorting12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: sort zeros ones and twos
Implement static int[] sort012(int[] a).JavaIntermediateSorting12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: transpose a rectangular matrix
Implement static int[][] transpose(int[][] a).JavaIntermediateMatrices12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: sum both matrix diagonals
Implement static long diagonalSum(int[][] a).JavaIntermediateMatrices12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: rotate a square matrix clockwise
Implement static int[][] rotateMatrix(int[][] a).JavaIntermediateMatrices12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: traverse a matrix in spiral order
Implement static List<Integer> spiral(int[][] a).JavaAdvancedMatrices20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: merge overlapping intervals
Implement static int[][] mergeIntervals(int[][] intervals).JavaAdvancedIntervals20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find search insert position
Implement static int insertPosition(int[] a, int target).JavaIntermediateBinary search12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: sort map entries by value
Implement static List<String> sortByValue(Map<String,Integer> m).JavaIntermediateCollections12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find first repeated value
Implement static int firstDuplicate(int[] a).JavaIntermediateCollections12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: subtract one list from another
Implement static List<Integer> difference(List<Integer> a, List<Integer> b).JavaIntermediateCollections12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: partition a list into chunks
Implement static List<List<Integer>> chunks(List<Integer> a, int size).JavaIntermediateCollections12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: next greater element to the right
Implement static int[] nextGreater(int[] a).JavaAdvancedStacks20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: days until a warmer temperature
Implement static int[] warmerDays(int[] t).JavaAdvancedStacks20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: evaluate postfix expressions
Implement static int postfix(String[] tokens).JavaAdvancedStacks20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: simulate a queue using two stacks
Implement static List<Integer> queueOps(String[] ops).JavaAdvancedStacks20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: simulate a minimum stack
Implement static List<Integer> minStack(String[] ops).JavaAdvancedStacks20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: maximum in each sliding window
Implement static int[] windowMax(int[] a, int k).JavaAdvancedSliding window20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: sum an array recursively
Implement static long recursiveSum(int[] a, int i).JavaIntermediateRecursion12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: reverse a string recursively
Implement static String recursiveReverse(String s).JavaIntermediateRecursion12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: generate balanced parentheses
Implement static List<String> parentheses(int n).JavaAdvancedBacktracking20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: generate subsets of distinct values
Implement static List<List<Integer>> subsets(int[] a).JavaAdvancedBacktracking20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: count ways to climb stairs
Implement static long climb(int n).JavaIntermediateDynamic programming12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: minimum coins for an amount
Implement static int coinChange(int[] coins, int amount).JavaAdvancedDynamic programming20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: length of longest increasing subsequence
Implement static int lis(int[] a).JavaAdvancedDynamic programming20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: length of longest common subsequence
Implement static int lcs(String a, String b).JavaAdvancedDynamic programming20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: calculate Levenshtein edit distance
Implement static int editDistance(String a, String b).JavaAdvancedDynamic programming20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: maximum sum without adjacent values
Implement static long nonAdjacentSum(int[] a).JavaAdvancedDynamic programming20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: count unique grid paths
Implement static long gridPaths(int rows, int cols).JavaAdvancedDynamic programming20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: filter even numbers using streams
Implement static List<Integer> evens(List<Integer> a).JavaIntermediateStreams12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: distinct sorted values with streams
Implement static List<Integer> distinctSorted(List<Integer> a).JavaIntermediateStreams12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: second distinct highest using streams
Implement static int secondHighest(List<Integer> a).JavaIntermediateStreams12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: partition numbers by parity
Implement static List<List<Integer>> partitionParity(List<Integer> a).JavaIntermediateStreams12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: flatten lists using streams
Implement static List<Integer> flattenLists(List<List<Integer>> rows).JavaIntermediateStreams12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find longest word with streams
Implement static String longestWord(List<String> words).JavaIntermediateStreams12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: sum squares using streams
Implement static long sumSquares(List<Integer> a).JavaIntermediateStreams12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: group words by length
Implement static Map<Integer,List<String>> groupByLength(List<String> a).JavaIntermediateStreams12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: count API status codes
Implement static Map<Integer,Integer> statusCounts(int[] codes).JavaIntermediateFramework utilities12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: calculate pass percentage
Implement static int passPercent(String[] statuses).JavaIntermediateFramework utilities12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: find slow test names
Implement static List<String> slowTests(String[] rows, long threshold).JavaIntermediateFramework utilities12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: deduplicate test identifiers
Implement static List<String> uniqueTestIds(List<String> ids).JavaIntermediateFramework utilities12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: parse a simple query string
Implement static Map<String,String> parseQuery(String query).JavaIntermediateFramework utilities12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: mask all but the final four characters
Implement static String mask(String s).JavaIntermediateFramework utilities12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: calculate capped retry delays
Implement static List<Long> backoff(long initial, long cap, int attempts).JavaAdvancedFramework utilities20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: compare numeric version strings
Implement static int compareVersion(String a, String b).JavaAdvancedFramework utilities20 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: normalize a test name
Implement static String normalizeName(String s).JavaIntermediateFramework utilities12 minUnlock practice · ₹99/month - Pro · ₹99/mo
Java: rank tests by failure count
Implement static List<String> topFailures(String[] names, int k).JavaAdvancedFramework utilities20 minUnlock practice · ₹99/month
This week's top coders
Solve questions to get your profile card here. Top 3 earn a Top Coder label.
Loading coders…
About QA coding rounds
Short coding questions of the kind QA and SDET interviews ask. You write code in the browser, run it, and hidden tests check your answer straight away.
Who it is for
- Manual testers facing their first coding round
- Automation testers practising JavaScript, TypeScript, Java or SQL questions
- SDET candidates warming up with Playwright-style and API-style tasks
What you need first
- Basic syntax in one language: JavaScript, TypeScript, Java or SQL
- No install: code runs in your browser (Java's first run takes 10–20 seconds to load)
- Sign in only to appear on the coders wall and daily leaderboard
Good to know
- Beginner questions are free; Intermediate and Advanced need Coding Rounds Pro or the free month that comes with a course purchase
- Your personal progress is saved in this browser, so it does not follow you to another device
- Playwright and API questions run against practice mocks, not real websites
Related resources
- Daily challenge one question a day
- Timed mock round
- JavaScript for QA course
- SQL interview questions
- QA interview practice by skill revise testing concepts alongside coding
Your next step
Coding rounds: common questions
1.Do I need to install anything?
2.How is my answer checked?
3.Which questions are free?
4.Is my progress saved?
Preparing for this interview?
DSA for SDET Interviews
8 practical lessons in about 60 minutes: the data structures and coding patterns SDET interviews actually ask, explained in Java with tester-friendly examples. Big-O, strings, arrays and hash maps, two pointers and sliding window, stacks and queues, recursion and sorting, and a timed mock round you can practise again and again.
Start the free courseBasic programs are free. Intermediate and Advanced practice is included in Coding Rounds Pro. Your progress is saved in this browser.
