Rolling Hash DSA Problems

29 rolling hash problems for coding interviews and campus placements, with hints and company tags. Below are all 29: 1 easy, 14 medium and 14 hard. Practise them free on InternHack and track what you have solved.

Rolling Hash problems, easiest first

  1. Count Prefix and Suffix Pairs I (Easy)
  2. Check If a String Contains All Binary Codes of Size K (Medium)
  3. Count Cells in Overlapping Horizontal and Vertical Substrings (Medium)
  4. Find Beautiful Indices in the Given Array I (Medium)
  5. Find Pattern in Infinite Stream I (Medium)
  6. K Divisible Elements Subarrays (Medium)
  7. Longest Repeating Substring (Medium)
  8. Maximum Length of Repeated Subarray (Medium)
  9. Minimum Number of Valid Strings to Form Target I (Medium)
  10. Minimum Time to Revert Word to Initial State I (Medium)
  11. Number of Distinct Substrings in a String (Medium)
  12. Number of Subarrays That Match a Pattern I (Medium)
  13. Repeated DNA Sequences (Medium)
  14. Strings Differ by One Character (Medium)
  15. Unique Substrings With Equal Digit Frequency (Medium)
  16. Count Prefix and Suffix Pairs II (Hard)
  17. Distinct Echo Substrings (Hard)
  18. Find Beautiful Indices in the Given Array II (Hard)
  19. Find Pattern in Infinite Stream II (Hard)
  20. Find Substring With Given Hash Value (Hard)
  21. Longest Chunked Palindrome Decomposition (Hard)
  22. Longest Common Subpath (Hard)
  23. Longest Duplicate Substring (Hard)
  24. Longest Happy Prefix (Hard)
  25. Maximum Deletions on a String (Hard)
  26. Minimum Time to Revert Word to Initial State II (Hard)
  27. Number of Subarrays That Match a Pattern II (Hard)
  28. Shortest Palindrome (Hard)
  29. Sum of Scores of Built Strings (Hard)

Companies that ask rolling hash problems

Before your interview

Most resumes are filtered by software before a recruiter reads them. Check your resume ATS score free, no signup needed.

Other DSA topics