Cognizant Coding Interview Questions

45 DSA problems tagged as asked in Cognizant coding interviews and online assessments. Below are all 45: 30 easy, 13 medium and 2 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

Cognizant DSA problems, easiest first

  1. Article Views I (Easy)
  2. Best Time to Buy and Sell Stock (Easy)
  3. Binary Search (Easy)
  4. Climbing Stairs (Easy)
  5. Combine Two Tables (Easy)
  6. Count Subarrays of Length Three With a Condition (Easy)
  7. Employees Earning More Than Their Managers (Easy)
  8. Fibonacci Number (Easy)
  9. Find Numbers with Even Number of Digits (Easy)
  10. Find the Highest Altitude (Easy)
  11. Fizz Buzz (Easy)
  12. Happy Number (Easy)
  13. Max Consecutive Ones (Easy)
  14. Merge Sorted Array (Easy)
  15. Minimum Absolute Difference (Easy)
  16. Move Zeroes (Easy)
  17. Palindrome Number (Easy)
  18. Product Sales Analysis I (Easy)
  19. Remove Duplicates from Sorted Array (Easy)
  20. Replace Employee ID With The Unique Identifier (Easy)
  21. Rising Temperature (Easy)
  22. Roman to Integer (Easy)
  23. Search Insert Position (Easy)
  24. Single Number (Easy)
  25. Sort Array By Absolute Value (Easy)
  26. Students and Examinations (Easy)
  27. Two Sum (Easy)
  28. Valid Anagram (Easy)
  29. Valid Palindrome (Easy)
  30. Valid Parentheses (Easy)
  31. Add Two Numbers (Medium)
  32. Group Anagrams (Medium)
  33. Jump Game (Medium)
  34. Longest Palindromic Substring (Medium)
  35. Longest Substring Without Repeating Characters (Medium)
  36. Maximum Subarray (Medium)
  37. Reverse Integer (Medium)
  38. Rotate Array (Medium)
  39. Second Highest Salary (Medium)
  40. Single Element in a Sorted Array (Medium)
  41. Smallest Value of the Rearranged Number (Medium)
  42. String Compression (Medium)
  43. Subarray Sum Equals K (Medium)
  44. First Missing Positive (Hard)
  45. Median of Two Sorted Arrays (Hard)

Prepare for the rest of the Cognizant process

Other companies