Best 30 LeetCode Problems for TCS, Wipro, Capgemini Interviews
Posted on: Thu Jun 19 2025
✅ How to Use This List
-
These questions are divided by topic.
-
Practice 1–2 problems daily.
-
Use the links to open them directly on LeetCode.
🔹 Arrays (8 Questions)
-
Two Sum – Find indices of two numbers that add up to a target.
-
Remove Duplicates from Sorted Array – Work with sorted arrays.
-
Best Time to Buy and Sell Stock – Learn single pass logic.
-
Move Zeroes – Rearranging elements in-place.
-
Maximum Subarray – Understand Kadane’s Algorithm.
-
Find the Duplicate Number – Asked in Capgemini & Wipro.
-
Merge Sorted Array – Combine two sorted arrays.
-
Majority Element – Simple frequency-based logic.
🔹 Strings (6 Questions)
-
Valid Anagram – Sort or use hashmaps.
-
Valid Palindrome – Clean and compare strings.
-
Longest Common Prefix – Basic string matching.
-
Implement strStr() – Asked in TCS Ninja.
-
Reverse String – Two-pointer technique.
-
First Unique Character in a String – Learn frequency-based scanning.
🔹 Searching and Sorting (4 Questions)
-
Binary Search – Basic search logic.
-
Search Insert Position – Easy variation of binary search.
-
Sort Colors – 3-pointer Dutch Flag problem.
-
Intersection of Two Arrays – Use sets effectively.
🔹 Recursion and Backtracking (3 Questions)
-
Fibonacci Number – Recursion basics.
-
Climbing Stairs – Common in Wipro.
-
Subsets – Learn how backtracking works.
🔹 Hashing and Maps (3 Questions)
-
Two Sum – Again, shows use of hashmaps.
-
Group Anagrams – Work with map of lists.
-
Isomorphic Strings – Track mapping between characters.
🔹 Math and Logic (3 Questions)
-
Power of Two – Bitwise or loop-based logic.
-
Add Digits – Basic loop question.
-
Happy Number – Asked in Capgemini coding round.
🔹 Miscellaneous (3 Questions)
-
Valid Parentheses – Stack-based matching.
-
Merge Two Sorted Lists – Learn linked list basics.
-
Linked List Cycle – Fast-slow pointer method.
Final Tips
-
Don’t try to solve all 30 in one go.
Understand the logic, not just the syntax.