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)

  1. Two Sum – TCS

  2. Best Time to Buy and Sell Stock – Wipro

  3. Contains Duplicate – Infosys

  4. Product of Array Except Self – Capgemini

  5. Maximum Subarray – Cognizant

  6. Maximum Product Subarray – Infosys

  7. Find Minimum in Rotated Sorted Array – Wipro

  8. Search in Rotated Sorted Array – TCS

  9. 3Sum – Capgemini

  10. Container With Most Water – Infosys

  11. Majority Element – Cognizant

  12. Rotate Array – Wipro

  13. Spiral Matrix – Infosys

  14. Set Matrix Zeroes – Capgemini

  15. Pascal’s Triangle – TCS

  16. Kth Largest Element in an Array – Infosys

  17. Merge Intervals – Wipro

  18. Insert Interval – Cognizant

  19. Summary Ranges – Infosys

  20. Missing Number – Capgemini

  21. Find the Duplicate Number – Wipro

  22. Minimum Size Subarray Sum – TCS

  23. Move Zeroes – Infosys

  24. Find All Numbers Disappeared in an Array – Capgemini

  25. Maximum Average Subarray I – Cognizant

 


 

🔹 Strings (25 Questions)

  1. Valid Anagram – Infosys

  2. Longest Common Prefix – TCS

  3. Implement strStr() – Wipro

  4. Reverse String – Capgemini

  5. Reverse Words in a String – Cognizant

  6. String Compression – Infosys

  7. Is Subsequence – Wipro

  8. Group Anagrams – TCS

  9. Valid Palindrome – Capgemini

  10. Longest Palindromic Substring – Infosys

  11. Count and Say – Cognizant

  12. First Unique Character in a String – Wipro

  13. Add Binary – Infosys

  14. Multiply Strings – TCS

  15. Minimum Window Substring – Capgemini

  16. Zigzag Conversion – Cognizant

  17. Roman to Integer – Infosys

  18. Integer to Roman – Wipro

  19. String to Integer (atoi) – TCS

  20. Length of Last Word – Capgemini

  21. Longest Substring Without Repeating Characters – Infosys

  22. Check If Two String Arrays are Equivalent – Cognizant

  23. Valid Parentheses – Wipro

  24. Remove All Adjacent Duplicates In String – Infosys

  25. Reverse Vowels of a String – Capgemini

🔹 Linked Lists (25 Questions)

  1. Reverse Linked List – TCS

  2. Merge Two Sorted Lists – Infosys

  3. Remove Nth Node From End of List – Wipro

  4. Linked List Cycle – Capgemini

  5. Palindrome Linked List – Cognizant

  6. Intersection of Two Linked Lists – Infosys

  7. Add Two Numbers – Wipro

  8. Flatten a Multilevel Doubly Linked List – TCS

  9. Copy List with Random Pointer – Capgemini

  10. Swap Nodes in Pairs – Cognizant

  11. Rotate List – Infosys

  12. Remove Linked List Elements – Wipro

  13. Delete Node in a Linked List – TCS

  14. Odd Even Linked List – Capgemini

  15. Reverse Nodes in k-Group – Cognizant

  16. Partition List – Infosys

  17. Remove Duplicates from Sorted List – Wipro

  18. Sort List – TCS

  19. Merge k Sorted Lists – Capgemini

  20. Split Linked List in Parts – Cognizant

  21. Next Greater Node In Linked List – Infosys

  22. Linked List Cycle II – Wipro

  23. Design Linked List – TCS

  24. Middle of the Linked List – Capgemini

  25. Remove Duplicates from Sorted List II – Cognizant

🔹 Trees (25 Questions)

  1. Maximum Depth of Binary Tree – TCS

  2. Same Tree – Infosys

  3. Invert Binary Tree – Wipro

  4. Binary Tree Level Order Traversal – Capgemini

  5. Symmetric Tree – Cognizant

  6. Balanced Binary Tree – Infosys

  7. Path Sum – Wipro

  8. Maximum Path Sum – TCS

  9. Construct Binary Tree from Preorder and Inorder Traversal – Capgemini

  10. Validate Binary Search Tree – Cognizant

  11. Lowest Common Ancestor of a Binary Tree – Infosys

  12. Binary Tree Right Side View – Wipro

  13. Binary Tree Zigzag Level Order Traversal – TCS

  14. Convert Sorted Array to Binary Search Tree – Capgemini

  15. Sum of Left Leaves – Cognizant

  16. Binary Tree Inorder Traversal – Infosys

  17. Serialize and Deserialize Binary Tree – Wipro

  18. Populating Next Right Pointers in Each Node – TCS

  19. Find Duplicate Subtrees – Capgemini

  20. Sum Root to Leaf Numbers – Cognizant

  21. Recover Binary Search Tree – Infosys

  22. Binary Search Tree Iterator – Wipro

  23. All Nodes Distance K in Binary Tree – TCS

  24. Flatten Binary Tree to Linked List – Capgemini

  25. Kth Smallest Element in a BST – Cognizant

🔹 Recursion & Backtracking (15 Questions)

  1. Permutations – TCS

  2. Combinations – Wipro

  3. Subsets – Infosys

  4. Letter Combinations of a Phone Number – Capgemini

  5. Combination Sum – Cognizant

  6. Generate Parentheses – Infosys

  7. Word Search – Wipro

  8. Sudoku Solver – TCS

  9. N-Queens – Capgemini

  10. Palindrome Partitioning – Cognizant

  11. Permutations II – Infosys

  12. Combination Sum II – Wipro

  13. Subsets II – TCS

  14. Restore IP Addresses – Capgemini

  15. Expression Add Operators – Cognizant

🔹 Stack & Queue (15 Questions)

  1. Valid Parentheses – TCS

  2. Min Stack – Wipro

  3. Evaluate Reverse Polish Notation – Infosys

  4. Implement Queue using Stacks – Capgemini

  5. Implement Stack using Queues – Cognizant

  6. Daily Temperatures – Infosys

  7. Next Greater Element I – Wipro

  8. Next Greater Element II – TCS

  9. Remove All Adjacent Duplicates In String II – Capgemini

  10. Design Circular Queue – Cognizant

  11. Sliding Window Maximum – Infosys

  12. Decode String – Wipro

  13. Design Stack With Increment Operation – TCS

  14. Number of Recent Calls – Capgemini

  15. Simplify Path – Cognizant

🔹 Graphs (15 Questions)

  1. Number of Islands – TCS

  2. Clone Graph – Infosys

  3. Course Schedule – Wipro

  4. Course Schedule II – Capgemini

  5. Graph Valid Tree – Cognizant

  6. Pacific Atlantic Water Flow – Infosys

  7. Redundant Connection – Wipro

  8. Network Delay Time – TCS

  9. Is Graph Bipartite? – Capgemini

  10. Word Ladder – Cognizant

  11. Reconstruct Itinerary – Infosys

  12. Find the Town Judge – Wipro

  13. All Paths From Source to Target – TCS

  14. Minimum Height Trees – Capgemini

  15. Critical Connections in a Network – Cognizant

🔹 Dynamic Programming (15 Questions)

  1. Climbing Stairs – TCS

  2. House Robber – Infosys

  3. House Robber II – Wipro

  4. Longest Palindromic Subsequence – Capgemini

  5. Decode Ways – Cognizant

  6. Maximum Subarray – Infosys

  7. Partition Equal Subset Sum – Wipro

  8. Coin Change – TCS

  9. Longest Increasing Subsequence – Capgemini

  10. Edit Distance – Cognizant

  11. Interleaving String – Infosys

  12. Target Sum – Wipro

  13. Best Time to Buy and Sell Stock with Cooldown – TCS

  14. Distinct Subsequences – Capgemini

  15. Word Break – Cognizant

🔹 Bit Manipulation (10 Questions)

  1. Single Number – Infosys

  2. Number of 1 Bits – Wipro

  3. Counting Bits – TCS

  4. Missing Number – Capgemini

  5. Sum of Two Integers – Cognizant

  6. Reverse Bits – Infosys

  7. Power of Two – Wipro

  8. Hamming Distance – TCS

  9. Bitwise AND of Numbers Range – Capgemini

  10. Binary Watch – Cognizant

🔹 Interview Must-Solve (30 Questions)

  1. LRU Cache – TCS

  2. Median of Two Sorted Arrays – Infosys

  3. Merge Intervals – Wipro

  4. Trapping Rain Water – Capgemini

  5. Longest Consecutive Sequence – Cognizant

  6. Word Ladder II – Infosys

  7. Basic Calculator – Wipro

  8. Largest Rectangle in Histogram – TCS

  9. Sliding Window Maximum – Capgemini

  10. Regular Expression Matching – Cognizant

  11. Wildcard Matching – Infosys

  12. Minimum Window Substring – Wipro

  13. Find Median from Data Stream – TCS

  14. Palindrome Pairs – Capgemini

  15. Design Add and Search Words Data Structure – Cognizant

  16. LFU Cache – Infosys

  17. Data Stream as Disjoint Intervals – Wipro

  18. Count of Smaller Numbers After Self – TCS

  19. Find Peak Element – Capgemini

  20. Basic Calculator II – Cognizant

  21. Insert Delete GetRandom O(1) – Infosys

  22. Maximal Rectangle – Wipro

  23. Read N Characters Given Read4 – TCS

  24. Binary Tree Cameras – Capgemini

  25. Paint House – Cognizant

  26. Serialize and Deserialize BST – Infosys

  27. Number of Digit One – Wipro

  28. Dungeon Game – TCS

  29. Burst Balloons – Capgemini

  30. Minimum Number of Refueling Stops – Cognizant