200+ Coding Questions Asked in Service-Based Companies – The Ultimate Practice List
Posted on: Sun Jun 22 2025
✅ How to Use This List
-
Don’t aim to finish all 200 in one week.
-
Pick 2–3 per day and focus on understanding the logic.
-
Use any language you’re comfortable with.
-
Start from Easy → Medium → Interview level.
🔹 Arrays (25 Questions)
-
Two Sum – TCS
-
Best Time to Buy and Sell Stock – Wipro
-
Contains Duplicate – Infosys
-
Product of Array Except Self – Capgemini
-
Maximum Subarray – Cognizant
-
Maximum Product Subarray – Infosys
-
3Sum – Capgemini
-
Container With Most Water – Infosys
-
Majority Element – Cognizant
-
Rotate Array – Wipro
-
Spiral Matrix – Infosys
-
Set Matrix Zeroes – Capgemini
-
Pascal’s Triangle – TCS
-
Kth Largest Element in an Array – Infosys
-
Merge Intervals – Wipro
-
Insert Interval – Cognizant
-
Summary Ranges – Infosys
-
Missing Number – Capgemini
-
Find the Duplicate Number – Wipro
-
Move Zeroes – Infosys
-
Find All Numbers Disappeared in an Array – Capgemini
-
Maximum Average Subarray I – Cognizant
🔹 Strings (25 Questions)
-
Valid Anagram – Infosys
-
Longest Common Prefix – TCS
-
Implement strStr() – Wipro
-
Reverse String – Capgemini
-
Reverse Words in a String – Cognizant
-
String Compression – Infosys
-
Is Subsequence – Wipro
-
Group Anagrams – TCS
-
Valid Palindrome – Capgemini
-
Longest Palindromic Substring – Infosys
-
Count and Say – Cognizant
-
Add Binary – Infosys
-
Multiply Strings – TCS
-
Minimum Window Substring – Capgemini
-
Zigzag Conversion – Cognizant
-
Roman to Integer – Infosys
-
Integer to Roman – Wipro
-
String to Integer (atoi) – TCS
-
Length of Last Word – Capgemini
-
Check If Two String Arrays are Equivalent – Cognizant
-
Valid Parentheses – Wipro
-
Remove All Adjacent Duplicates In String – Infosys
-
Reverse Vowels of a String – Capgemini
🔹 Linked Lists (25 Questions)
-
Reverse Linked List – TCS
-
Merge Two Sorted Lists – Infosys
-
Remove Nth Node From End of List – Wipro
-
Linked List Cycle – Capgemini
-
Palindrome Linked List – Cognizant
-
Intersection of Two Linked Lists – Infosys
-
Add Two Numbers – Wipro
-
Copy List with Random Pointer – Capgemini
-
Swap Nodes in Pairs – Cognizant
-
Rotate List – Infosys
-
Remove Linked List Elements – Wipro
-
Odd Even Linked List – Capgemini
-
Reverse Nodes in k-Group – Cognizant
-
Partition List – Infosys
-
Sort List – TCS
-
Merge k Sorted Lists – Capgemini
-
Split Linked List in Parts – Cognizant
-
Next Greater Node In Linked List – Infosys
-
Linked List Cycle II – Wipro
-
Design Linked List – TCS
-
Middle of the Linked List – Capgemini
-
Remove Duplicates from Sorted List II – Cognizant
🔹 Trees (25 Questions)
-
Same Tree – Infosys
-
Invert Binary Tree – Wipro
-
Binary Tree Level Order Traversal – Capgemini
-
Symmetric Tree – Cognizant
-
Balanced Binary Tree – Infosys
-
Path Sum – Wipro
-
Maximum Path Sum – TCS
-
Construct Binary Tree from Preorder and Inorder Traversal – Capgemini
-
Validate Binary Search Tree – Cognizant
-
Lowest Common Ancestor of a Binary Tree – Infosys
-
Binary Tree Right Side View – Wipro
-
Convert Sorted Array to Binary Search Tree – Capgemini
-
Sum of Left Leaves – Cognizant
-
Binary Tree Inorder Traversal – Infosys
-
Find Duplicate Subtrees – Capgemini
-
Sum Root to Leaf Numbers – Cognizant
-
Recover Binary Search Tree – Infosys
-
Binary Search Tree Iterator – Wipro
-
Flatten Binary Tree to Linked List – Capgemini
-
Kth Smallest Element in a BST – Cognizant
🔹 Recursion & Backtracking (15 Questions)
-
Permutations – TCS
-
Combinations – Wipro
-
Subsets – Infosys
-
Letter Combinations of a Phone Number – Capgemini
-
Combination Sum – Cognizant
-
Generate Parentheses – Infosys
-
Word Search – Wipro
-
Sudoku Solver – TCS
-
N-Queens – Capgemini
-
Palindrome Partitioning – Cognizant
-
Permutations II – Infosys
-
Combination Sum II – Wipro
-
Subsets II – TCS
-
Restore IP Addresses – Capgemini
-
Expression Add Operators – Cognizant
🔹 Stack & Queue (15 Questions)
-
Valid Parentheses – TCS
-
Min Stack – Wipro
-
Evaluate Reverse Polish Notation – Infosys
-
Implement Queue using Stacks – Capgemini
-
Implement Stack using Queues – Cognizant
-
Daily Temperatures – Infosys
-
Next Greater Element I – Wipro
-
Next Greater Element II – TCS
-
Remove All Adjacent Duplicates In String II – Capgemini
-
Design Circular Queue – Cognizant
-
Sliding Window Maximum – Infosys
-
Decode String – Wipro
-
Number of Recent Calls – Capgemini
-
Simplify Path – Cognizant
🔹 Graphs (15 Questions)
-
Number of Islands – TCS
-
Clone Graph – Infosys
-
Course Schedule – Wipro
-
Course Schedule II – Capgemini
-
Graph Valid Tree – Cognizant
-
Pacific Atlantic Water Flow – Infosys
-
Redundant Connection – Wipro
-
Network Delay Time – TCS
-
Is Graph Bipartite? – Capgemini
-
Word Ladder – Cognizant
-
Reconstruct Itinerary – Infosys
-
Find the Town Judge – Wipro
-
Minimum Height Trees – Capgemini
-
Critical Connections in a Network – Cognizant
🔹 Dynamic Programming (15 Questions)
-
Climbing Stairs – TCS
-
House Robber – Infosys
-
House Robber II – Wipro
-
Longest Palindromic Subsequence – Capgemini
-
Decode Ways – Cognizant
-
Maximum Subarray – Infosys
-
Partition Equal Subset Sum – Wipro
-
Coin Change – TCS
-
Longest Increasing Subsequence – Capgemini
-
Edit Distance – Cognizant
-
Interleaving String – Infosys
-
Target Sum – Wipro
-
Distinct Subsequences – Capgemini
-
Word Break – Cognizant
🔹 Bit Manipulation (10 Questions)
-
Single Number – Infosys
-
Number of 1 Bits – Wipro
-
Counting Bits – TCS
-
Missing Number – Capgemini
-
Sum of Two Integers – Cognizant
-
Reverse Bits – Infosys
-
Power of Two – Wipro
-
Hamming Distance – TCS
-
Bitwise AND of Numbers Range – Capgemini
-
Binary Watch – Cognizant
🔹 Interview Must-Solve (30 Questions)
-
LRU Cache – TCS
-
Median of Two Sorted Arrays – Infosys
-
Merge Intervals – Wipro
-
Trapping Rain Water – Capgemini
-
Longest Consecutive Sequence – Cognizant
-
Word Ladder II – Infosys
-
Basic Calculator – Wipro
-
Sliding Window Maximum – Capgemini
-
Regular Expression Matching – Cognizant
-
Wildcard Matching – Infosys
-
Minimum Window Substring – Wipro
-
Palindrome Pairs – Capgemini
-
Design Add and Search Words Data Structure – Cognizant
-
LFU Cache – Infosys
-
Find Peak Element – Capgemini
-
Basic Calculator II – Cognizant
-
Insert Delete GetRandom O(1) – Infosys
-
Maximal Rectangle – Wipro
-
Binary Tree Cameras – Capgemini
-
Paint House – Cognizant
-
Serialize and Deserialize BST – Infosys
-
Number of Digit One – Wipro
-
Dungeon Game – TCS
-
Burst Balloons – Capgemini
-
Minimum Number of Refueling Stops – Cognizant