0 / 112 solvedEasy 0/67Medium 0/38Hard 0/7Continue Basics and maths
0/12
| Status | Problem | Difficulty | Asked in |
|---|
| Not started | Count the digits of a number | Easy | Asked in: JPMorgan Chase, TCS |
| Not started | Reverse the digits of an integer | Easy | Asked in: Capgemini, Infosys, Wipro |
| Pro+ | Swap two numbers without a third variable | Easy | Asked in: Accenture, Capgemini, Infosys +1 |
| Pro+ | The first n Fibonacci numbers | Easy | Asked in: Capgemini |
| Pro+ | Check whether a year is a leap year | Easy | Asked in: Infosys |
| Pro+ | Check whether a number is an Armstrong number | Easy | Asked in: Oracle, VMware |
| Pro+ | Add the digits until one digit remains | Easy | Asked in: Zupee |
| Pro+ | Check whether a number is prime | Easy | Asked in: Accenture, Capgemini, TCS |
| Pro+ | Build a star pyramid pattern | Easy | Asked in: Accenture, Capgemini, Cognizant |
| Pro+ | Compute an electricity bill from unit slabs | Easy | Asked in: Wipro |
| Pro+ | List all primes up to n (Sieve of Eratosthenes) | Easy-Medium | Asked in: Accenture, Capgemini, TCS |
| Pro+ | Multiply two numbers without the multiplication operator | Easy-Medium | Asked in: Accenture |
About basics and maths
Arrays
0/11
| Status | Problem | Difficulty | Asked in |
|---|
| Not started | Find the largest and second largest values | Easy | Asked in: Capgemini, Infosys, Razorpay +2 |
| Not started | Find the missing number | Easy | Asked in: Accenture, Coupa |
| Pro+ | Move all zeros to the end | Easy | Asked in: Amazon, Bloomberg, LinkedIn +3 |
| Pro+ | Merge two sorted lists | Easy-Medium | Asked in: Capgemini |
| Pro+ | Rotate a list to the right by k steps | Easy-Medium | Asked in: Adobe, Amazon, Apple +3 |
| Pro+ | Find the leaders in a list | Easy-Medium | |
| Pro+ | Best time to buy and sell a stock | Easy-Medium | Asked in: Adobe, Amazon, Google +3 |
| Pro+ | Find the majority element | Easy-Medium | Asked in: Amazon, Atlassian, D. E. Shaw +3 |
| Pro+ | Sort a list of 0s, 1s and 2s in one pass | Medium | Asked in: GreyOrange |
| Pro+ | Maximum subarray sum (Kadane) | Medium | Asked in: Adobe, Amazon, Flipkart +3 |
| Pro+ | Find the repeating and the missing number | Medium | Asked in: Amazon, Apple, Bloomberg +3 |
About arrays
Strings
0/17
| Status | Problem | Difficulty | Asked in |
|---|
| Not started | Reverse a string | Easy | Asked in: Accenture, Capgemini, Cognizant +2 |
| Not started | Check whether a string is a palindrome | Easy | Asked in: Accenture, Capgemini, Wipro |
| Pro+ | Count vowels, consonants, digits, spaces and other characters | Easy | Asked in: Capgemini, TCS, Wipro |
| Pro+ | Remove special characters, keep letters and digits | Easy | Asked in: Infosys |
| Pro+ | Remove extra spaces from a sentence | Easy | |
| Pro+ | Pad a number with leading zeros | Easy | Asked in: Accenture |
| Pro+ | Remove duplicate characters | Easy | Asked in: Cognizant, Infosys, Wipro |
| Pro+ | Check whether two strings are anagrams | Easy | Asked in: Capgemini |
| Pro+ | Longest common prefix of a list of strings | Easy | Asked in: Google, Microsoft, VMware |
| Pro+ | Count each character | Easy-Medium | Asked in: Capgemini, Infosys, TCS +1 |
| Pro+ | Find the duplicate characters and their counts | Easy-Medium | Asked in: Accenture, Capgemini |
| Pro+ | Reverse the words in a sentence | Easy-Medium | Asked in: Capgemini, TCS, Wipro |
| Pro+ | Reverse each word and capitalise its first letter | Easy-Medium | |
| Pro+ | Compress a string with run counts (aaabb to a3b2) | Easy-Medium | Asked in: Fivetran, TCS |
| Pro+ | Reverse a string but keep the spaces in place | Medium | Asked in: Infosys, Zupee |
| Pro+ | Extract valid dates from a text | Medium | Asked in: Capgemini, Infosys |
| Pro+ | Add two very large numbers given as strings | Medium | Asked in: PhonePe |
About strings
Hashing: counting and lookups
0/13
| Status | Problem | Difficulty | Asked in |
|---|
| Not started | Two sum | Easy | |
| Not started | First non-repeating character | Easy | Asked in: Amazon, Flipkart, Goldman Sachs +3 |
| Pro+ | Count how often each value occurs | Easy | Asked in: Capgemini, Infosys |
| Pro+ | Find the duplicate values in a list | Easy | Asked in: Accenture, Capgemini, Infosys +1 |
| Pro+ | Remove duplicates from a list, keeping the order | Easy | Asked in: Cognizant |
| Pro+ | Check whether all characters are unique | Easy | Asked in: Capgemini |
| Pro+ | Find the characters common to two strings | Easy-Medium | Asked in: Capgemini, Infosys |
| Pro+ | Count how often each word occurs | Easy-Medium | Asked in: Infosys |
| Pro+ | Remove repeated words from a sentence | Easy-Medium | Asked in: Infosys |
| Pro+ | Fewest distinct values after removing k items | Medium | Asked in: Fivetran |
| Pro+ | Longest run of consecutive numbers | Medium | Asked in: Amazon |
| Pro+ | Group anagrams together | Medium | Asked in: Amazon, Goldman Sachs, Google +3 |
| Pro+ | Count the subarrays that add up to k | Medium | Asked in: Adobe, Amazon, Apple +3 |
About hashing: counting and lookups
Sorting
0/6
Binary search
0/6
| Status | Problem | Difficulty | Asked in |
|---|
| Not started | Binary search | Easy | Asked in: JPMorgan Chase, Zupee |
| Not started | Search insert position | Easy | Asked in: Adobe, Amazon, Apple +3 |
| Pro+ | Square root without a library function | Easy-Medium | Asked in: Accolite, Amazon, Flipkart +2 |
| Pro+ | First and last position of a value in a sorted list | Medium | Asked in: Amazon, Google, Microsoft |
| Pro+ | Search in a rotated sorted list | Medium | Asked in: Adobe, Amazon, Flipkart +3 |
| Pro+ | Smallest truck capacity to ship packages in d days | Medium-Hard | Asked in: Amazon, D. E. Shaw |
About binary search
Two pointers and sliding window
0/7
Recursion and backtracking
0/7
| Status | Problem | Difficulty | Asked in |
|---|
| Not started | Fast power: x to the power n, modulo 1,000,000,007 | Easy-Medium | |
| Not started | All subsets of a list | Medium | Asked in: Adobe, Amazon, Apple +3 |
| Pro+ | All permutations of a list | Medium | Asked in: Adobe, Amazon, Apple +3 |
| Pro+ | Combination sum: reach a target with reusable values | Medium | Asked in: Adobe, Amazon, Microsoft +1 |
| Pro+ | Generate balanced brackets up to a depth limit | Medium | |
| Pro+ | Word search in a letter grid | Medium | Asked in: Amazon, Apple, Intuit +2 |
| Pro+ | Find all dictionary words in a letter grid | Hard | Asked in: Airbnb, Amazon, Apple +3 |
About recursion and backtracking
Linked list
0/9
| Status | Problem | Difficulty | Asked in |
|---|
| Not started | Reverse a linked list | Easy | Asked in: AMD |
| Not started | Middle node of a linked list | Easy | Asked in: Adobe, Amazon, Flipkart +3 |
| Pro+ | Merge two sorted linked lists | Easy | Asked in: Amazon, Flipkart, Microsoft +3 |
| Pro+ | Remove the nth node from the end of a linked list | Easy-Medium | Asked in: Adobe, Amazon, Apple +3 |
| Pro+ | Check whether a linked list is a palindrome | Easy-Medium | Asked in: Accolite, Adobe, Amazon +3 |
| Pro+ | Detect a loop in a chain of links and find where it starts | Medium | Asked in: Adobe, Amazon, Apple +3 |
| Pro+ | Add two numbers stored as linked lists | Medium | Asked in: Adobe, Amazon, Apple +3 |
| Pro+ | Insert a value into a sorted circular linked list | Medium-Hard | Asked in: Amazon, Microsoft, Zoho |
| Pro+ | Reverse a linked list in groups of k | Hard | Asked in: Adobe, Amazon, Goldman Sachs +3 |
About linked list
Stack and queue
0/6
| Status | Problem | Difficulty | Asked in |
|---|
| Not started | Balanced brackets | Easy-Medium | Asked in: Swiggy |
| Not started | Build a queue from two stacks | Easy-Medium | Asked in: Adobe, Amazon, Apple +3 |
| Pro+ | Min stack: a stack that knows its smallest value | Medium | Asked in: Adobe, Amazon, Flipkart +3 |
| Pro+ | Next greater element for every value | Medium | Asked in: Adobe, Amazon, Flipkart +2 |
| Pro+ | Maximum of every window of size k | Hard | Asked in: Adobe, Amazon, Apple +3 |
| Pro+ | Largest rectangle in a histogram | Hard | Asked in: Google, Microsoft, NPCI |
About stack and queue
Trees
0/10
| Status | Problem | Difficulty | Asked in |
|---|
| Not started | Inorder traversal of a binary tree | Easy | Asked in: Deloitte |
| Not started | Maximum depth (height) of a binary tree | Easy | Asked in: Adobe, Amazon, Apple +3 |
| Pro+ | Level order traversal of a binary tree | Easy-Medium | Asked in: Adobe, Amazon, Flipkart +3 |
| Pro+ | Check whether two binary trees are the same | Easy | Asked in: Amazon, Flipkart, Microsoft |
| Pro+ | Check whether a binary tree is a mirror of itself | Easy | Asked in: Adobe, Amazon, Apple +3 |
| Pro+ | Diameter of a binary tree | Medium | Asked in: Amazon, Microsoft, NPCI +1 |
| Pro+ | Insert a value into a binary search tree | Easy-Medium | Asked in: Deloitte |
| Pro+ | Check whether a binary tree is a valid binary search tree | Medium | Asked in: Adobe, Amazon, Flipkart +3 |
| Pro+ | Lowest common ancestor of two nodes in a binary tree | Medium | Asked in: Amazon, American Express, Flipkart +3 |
| Pro+ | Maximum path sum in a binary tree | Hard | Asked in: Flipkart, Google, Meta +1 |
About trees
Further problems
0/8
Not startedNot startedIn progressIn progressSolvedSolvedPro+Pro+ The first 2 questions of each topic are free. Pro+ opens every question.