Cognizant Interview Questions — 29 DSA Problems
29 problems with full solutions in Python, Java, C++, JavaScript, Go, Rust.
Most frequently asked Cognizant LeetCode questions for software engineering interviews.
- Palindrome Number (EASY) — Math
- Count Subarrays of Length Three With a Condition (EASY) — Array
- Smallest Value of the Rearranged Number (MEDIUM) — Math, Sorting
- Two Sum (EASY) — Array, Hash Table
- Fibonacci Number (EASY) — Math, Dynamic Programming, Recursion, Memoization
- Longest Palindromic Substring (MEDIUM) — Two Pointers, String, Dynamic Programming
- Valid Anagram (EASY) — Hash Table, String, Sorting
- Remove Duplicates from Sorted Array (EASY) — Array, Two Pointers
- Maximum Subarray (MEDIUM) — Array, Divide and Conquer, Dynamic Programming
- Product Sales Analysis I (EASY) — Database
- Reverse Integer (MEDIUM) — Math
- Second Highest Salary (MEDIUM) — Database
- Managers with at Least 5 Direct Reports (MEDIUM) — Database
- Valid Parentheses (EASY) — String, Stack
- Longest Common Prefix (EASY) — String, Trie
- Longest Substring Without Repeating Characters (MEDIUM) — Hash Table, String, Sliding Window
- Fizz Buzz (EASY) — Math, String, Simulation
- Rising Temperature (EASY) — Database
- Median of Two Sorted Arrays (HARD) — Array, Binary Search, Divide and Conquer
- Add Two Numbers (MEDIUM) — Linked List, Math, Recursion
- Merge Sorted Array (EASY) — Array, Two Pointers, Sorting
- Count Primes (MEDIUM) — Array, Math, Enumeration, Number Theory
- Students and Examinations (EASY) — Database
- 3Sum (MEDIUM) — Array, Two Pointers, Sorting
- Move Zeroes (EASY) — Array, Two Pointers
- Binary Search (EASY) — Array, Binary Search
- Happy Number (EASY) — Hash Table, Math, Two Pointers
- Merge Two Sorted Lists (EASY) — Linked List, Recursion
- Search Insert Position (EASY) — Array, Binary Search
C
Cognizant
29 questions tracked29 with solutions
Frequency scoreSorted highest → lowest frequency✓ Our Solution = we have a detailed walkthrough
Showing 29 of 29 questions
5MathDynamic ProgrammingRecursionMemoization
6Two PointersStringDynamic Programming
9ArrayDivide and ConquerDynamic Programming
16Hash TableStringSliding Window
19ArrayBinary SearchDivide and Conquer
22ArrayMathEnumerationNumber Theory
27Hash TableMathTwo Pointers