Cognizant Coding Interview Questions: 25 Tagged Problems
25 coding problems tagged Cognizant — 23 easy · 2 medium — with solutions in 13 languages. Plus a 3-week study plan by topic.
- Problems: 25
- By difficulty: 23 easy · 2 medium
- Languages: JavaScript, TypeScript, Python, Java, C++, C, C#, Go, Kotlin, Swift, Rust, PHP and Ruby
- Cost: Free on every plan; sign in to run and submit
25 problems the CodeKairo catalogue tags as commonly asked in Cognizant's coding rounds — 23 easy and 2 medium, no hard ones — each judged by hidden tests in 13 languages. The most common topics among them are Strings (13), Arrays (9) and Hash Table (8). CodeKairo's Cognizant GenC — Aptitude mock covers the aptitude round of the Cognizant GenC assessment, a long paper in which reasoning outweighs everything else. The tag is the catalogue's own annotation of where a problem tends to come up — not a list published by Cognizant, which CodeKairo is not affiliated with.
Cognizant study plan by topic
All 25 problems tagged Cognizant over 3 weeks, about 8 h 50 min of solving, grouped by technique in the order they build on each other — Arrays, Strings, Hash Table and Counting and 7 more. It ends with the Cognizant GenC — Aptitude mock.
Week 1: Arrays, Strings, Hash Table +1
12 problems on Arrays, Strings, Hash Table and Counting, easiest first within each topic.
- Special Array I Easy
- Detect Capital Easy
- Truncate Sentence Easy
- Student Attendance Record I Easy
- Count the Number of Vowel Strings in Range Easy
- Maximum Number of Words You Can Type Easy
- The Two Sneaky Numbers of Digitville Easy
- Check if The Number is Fascinating Easy
- Existence of a Substring in a String and Its Reverse Easy
- Number of Good Pairs Easy
- Check if Number Has Equal Digit Count and Digit Value Easy
- Substrings of Size Three with Distinct Characters Easy
Week 2: Math, Sliding Window, Sorting +3
12 problems on Math, Sliding Window, Sorting, Simulation, Greedy and Bit Manipulation, easiest first within each topic.
- Automorphic Number Easy
- Self Dividing Numbers Easy
- Max Consecutive Ones II Medium
- Count Vowel Substrings of a String Medium
- Apple Redistribution into Boxes Easy
- Divide a String Into Groups of Size k Easy
- Matrix Similarity After Cyclic Shifts Easy
- Find the Child Who Has the Ball After K Seconds Easy
- Convert Array Into Zig-Zag Fashion Easy
- Minimum Moves to Convert String Easy
- Number of Steps to Reduce a Number to Zero Easy
- Number of Even and Odd Bits Easy
Week 3: Number Theory
1 problem on Number Theory.
- Add Digits Easy
Finally: the timed test
Sit the Cognizant GenC — Aptitude mock under the clock — the coding problems are only one part of the round.
Cognizant test patterns
- Cognizant GenC — Aptitude pattern guide and timed mock
All problems tagged Cognizant
Easy (23)
- Special Array I Array
- Existence of a Substring in a String and Its Reverse String, Hash Table
- Apple Redistribution into Boxes Array, Greedy, Sorting
- Find the Child Who Has the Ball After K Seconds Math, Simulation
- Matrix Similarity After Cyclic Shifts Array, Matrix, Simulation
- Minimum Moves to Convert String String, Greedy
- Substrings of Size Three with Distinct Characters String, Hash Table, Sliding Window
- Check if Number Has Equal Digit Count and Digit Value Hash Table, String, Counting
- Number of Even and Odd Bits Bit Manipulation, Math
- Check if The Number is Fascinating Math, Hash Table, String
- Divide a String Into Groups of Size k String, Simulation
- Count the Number of Vowel Strings in Range String, Array
- Student Attendance Record I String
- Convert Array Into Zig-Zag Fashion Array, Greedy
- The Two Sneaky Numbers of Digitville Array, Hash Table
- Maximum Number of Words You Can Type String, Hash Table
- Truncate Sentence Array, String
- Detect Capital String
- Number of Good Pairs Array, Hash Table, Math
- Number of Steps to Reduce a Number to Zero Math, Bit Manipulation
- Self Dividing Numbers Math
- Automorphic Number Math, String
- Add Digits Math, Simulation, Number Theory
Medium (2)
- Count Vowel Substrings of a String Hash Table, String, Sliding Window
- Max Consecutive Ones II Array, Sliding Window, Dynamic Programming
Topics Cognizant asks most
- Strings 13 problems
- Arrays 9 problems
- Hash Table 8 problems
- Math 8 problems
- Simulation 4 problems
- Counting 3 problems
- Sliding Window 3 problems
- Greedy 3 problems
- Bit Manipulation 2 problems
- Sorting 1 problem
- Matrix 1 problem
- Number Theory 1 problem