Interview Intel · Cognizant

Cognizant coding interview
questions, leaked.

29 problems reported across recent Cognizant interviews. Top patterns: array, math, two pointers. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.

Founder's read

Cognizant's coding assessment hits you with 29 problems across fundamentals, and you'll see a lot of array and math patterns. The good news: 18 of the 29 are easy, so the bar isn't meant to break you. The bad news: easy doesn't mean obvious when you're live and nervous. Two Sum, Palindrome Number, Valid Parentheses, Remove Duplicates from Sorted Array, and Fibonacci Number show up in their rotation. If you blank mid-assessment and can't recall a hash-table or two-pointer trick, StealthCoder runs invisibly during screen share and surfaces a working solution in seconds, no proctor visibility.

Tracked problems
29
Easy
18/ 62%
Medium
10/ 34%
Hard
1/ 3%

Top problems at Cognizant

leaked_problems.csv29 rows
#ProblemDiffFrequency
01Palindrome NumberEASY
100.0
02Count Subarrays of Length Three With a ConditionEASY
95.6
03Smallest Value of the Rearranged NumberMEDIUM
95.6
04Two SumEASY
83.2
05Fibonacci NumberEASY
78.8
06Longest Palindromic SubstringMEDIUM
73.4
07Valid AnagramEASY
73.4
08Second Highest SalaryMEDIUM
66.5
09Remove Duplicates from Sorted ArrayEASY
66.5
10Longest Common PrefixEASY
66.5
11Managers with at Least 5 Direct ReportsMEDIUM
66.5
12Maximum SubarrayMEDIUM
66.5
13Reverse IntegerMEDIUM
66.5
14Product Sales Analysis IEASY
66.5
15Valid ParenthesesEASY
66.5
16Median of Two Sorted ArraysHARD
56.7
17Longest Substring Without Repeating CharactersMEDIUM
56.7
18Merge Sorted ArrayEASY
56.7
19Count PrimesMEDIUM
56.7
203SumMEDIUM
56.7
21Happy NumberEASY
56.7
22Move ZeroesEASY
56.7
23Binary SearchEASY
56.7
24Merge Two Sorted ListsEASY
56.7
25Add Two NumbersMEDIUM
56.7
26Fizz BuzzEASY
56.7
27Rising TemperatureEASY
56.7
28Students and ExaminationsEASY
56.7
29Search Insert PositionEASY
56.7

Frequencies derived from public community-tagged interview reports. Click a row to view on LeetCode.

The hedge

You have a week, maybe less. You can't out-grind the list above. StealthCoder runs invisibly during the actual Cognizant OA. The proctor cannot see it. Screen share cannot detect it. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.

Get StealthCoder
Topic distribution
What this means

Arrays dominate the topic distribution (11 problems), followed by math (8) and two-pointers plus string (6 each). This is a fundamentals-first signal. You don't need to grind advanced dynamic programming or graph theory. Spend your last days on array manipulation, two-pointer sweeps (Remove Duplicates, Longest Palindromic Substring), and math tricks (Palindrome Number, Reverse Integer, Fibonacci). Database problems (5 total) appear less frequently but show up enough to cost you points if you blank on a JOIN or GROUP BY. One hard problem exists in the set, so it's not a trap door. Stack, sorting, and recursion round out the tail. If you hit a wall on an unfamiliar variation of a two-pointer or array problem live, StealthCoder is your safety net, delivering a working approach when you need it most.

Companies with similar patterns

If you prepped for Cognizant, these companies recycle ~60% of the same topics.

The honest play

You've seen the list. Now make sure you pass Cognizant.

Memorizing every problem above in a week is a fantasy. StealthCoder is the hedge: an AI overlay that's invisible during screen share. It reads the problem on screen and surfaces a working solution in under 2 seconds. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Cognizant interview FAQ

How many array problems should I solve before the Cognizant OA?+

Array is the top topic at 11 problems, roughly 38 percent of the assessment. Drill at least 15 to 20 array problems covering subarrays, two-pointer moves, and prefix/suffix patterns. Two Sum, Remove Duplicates, Count Subarrays of Length Three, and Maximum Subarray are anchors. Stop when you can spot the pattern in under a minute.

Is database knowledge required for Cognizant?+

Yes, but targeted. Database appears 5 times, roughly 17 percent of problems. Second Highest Salary, Managers with at Least 5 Direct Reports, and Product Sales Analysis are the types. You don't need expert SQL, but know JOINs, GROUP BY, and window functions. If SQL isn't your strength, focus on the other 24 problems first.

Should I study dynamic programming and recursion before this assessment?+

Not as a priority. Both appear only 3 times each. Fibonacci Number is the only pure recursion problem in the top rotation. If you're short on time, skip advanced DP and focus on arrays, math, and two-pointers. DP concepts will feel optional, not critical.

What math problems should I prepare for?+

Math shows up 8 times. Palindrome Number, Fibonacci Number, Reverse Integer, and Smallest Value of the Rearranged Number are the anchors. These aren't calculus. They're digit manipulation, number properties, and simple arithmetic. Spend 2 to 3 hours on math patterns and you'll own that section.

Is one hard problem enough to tank my score?+

Unlikely. Only 1 hard problem exists among 29, and the rest are easy or medium. Even if you skip it, you can hit 96 percent completion and score well. That said, if you have time after nailing the easy and medium problems, tackling one hard problem builds confidence and signals depth.

Problem frequencies sourced from public community-maintained interview-report repos. Problems, ratings, and trademarks are property of LeetCode and Cognizant. StealthCoder is not affiliated with Cognizant.