Skip to content

Interview Solver

FeaturesPricingHelp
Sign In
FeaturesPricingHelpSign In
Interview Questions›Topics›Z Algorithm

Z Algorithm Interview Questions

Master 11 z algorithm problems frequently asked in technical interviews. These questions test your understanding of z algorithmconcepts and are essential for coding interview success.

11
Total Problems
2
Easy
3
Medium
6
Hard

Related Topics

StringString MatchingRolling HashHash FunctionKnuth–Morris–Pratt AlgorithmBoyer–Moore String-Search AlgorithmBinary SearchTwo Pointers
#187MediumFrequency: 57.5%

Repeated DNA Sequences

Asked at LinkedIn
Hash TableStringBit ManipulationSliding WindowRolling HashHash FunctionZ AlgorithmBoyer–Moore String-Search Algorithm
#1
Rank
#28EasyFrequency: 55.2%

Find the Index of the First Occurrence in a String

Asked at Microsoft
Two PointersStringString MatchingZ AlgorithmKnuth–Morris–Pratt AlgorithmBoyer–Moore String-Search Algorithm
#2
Rank
#214HardFrequency: 38.2%

Shortest Palindrome

Asked at Google
StringRolling HashString MatchingHash FunctionManacherZ AlgorithmKnuth–Morris–Pratt Algorithm
#3
Rank
#459EasyFrequency: 34.8%

Repeated Substring Pattern

Asked at Google
StringString MatchingZ AlgorithmKnuth–Morris–Pratt Algorithm
#4
Rank
#1122HardFrequency: 33%

Longest Duplicate Substring

Asked at TikTok
StringBinary SearchSliding WindowRolling HashSuffix ArrayHash FunctionSuffix AutomatonSuffix TreeZ AlgorithmBoyer–Moore String-Search Algorithm
#5
Rank
#686MediumFrequency: 29.7%

Repeated String Match

Asked at Google
StringString MatchingZ AlgorithmKnuth–Morris–Pratt AlgorithmBoyer–Moore String-Search Algorithm
#6
Rank
#1508HardFrequency: 22%

Longest Happy Prefix

Asked at Apple
StringRolling HashString MatchingHash FunctionZ AlgorithmKnuth–Morris–Pratt Algorithm
#7
Rank
#3305HardFrequency: 20.3%

Count Prefix and Suffix Pairs II

Asked at Uber
ArrayStringTrieRolling HashString MatchingHash FunctionZ Algorithm
#8
Rank
#2326HardFrequency: 20%

Sum of Scores of Built Strings

Asked at Amazon
StringBinary SearchRolling HashSuffix ArrayString MatchingHash FunctionZ AlgorithmKnuth–Morris–Pratt Algorithm
#9
Rank
#3303HardFrequency: 19.5%

Find Beautiful Indices in the Given Array II

Asked at Google
Two PointersStringBinary SearchRolling HashString MatchingHash FunctionZ AlgorithmKnuth–Morris–Pratt AlgorithmBoyer–Moore String-Search Algorithm
#10
Rank
#3245MediumFrequency: 7.3%

Find Beautiful Indices in the Given Array I

Asked at Microsoft
Two PointersStringBinary SearchRolling HashString MatchingHash FunctionZ AlgorithmKnuth–Morris–Pratt AlgorithmBoyer–Moore String-Search Algorithm
#11
Rank
View All Topics

Master Z Algorithm in Real Interviews

Get AI-powered assistance when solving z algorithm problems during your actual interviews.

Get Started Free

No credit card required

Interview Solver
  • Home
  • About
  • Pricing
  • Sign in
  • Contact
  • Blog
  • Companion
  • Help Center
  • Developers
  • Use Cases
  • Software Engineer
  • Product Manager
  • Misc
  • Privacy Policy
  • Terms and Conditions
  • Refund & Cancellation
  • Discord Community
  • Affiliate Program
  • Compare
  • All Comparisons
  • vs Final Round AI
  • vs UltraCode
  • vs Interview Coder
  • vs LockedIn AI
  • vs AI Apply
  • Free Tools
  • ATS Resume Checker
  • STAR Method Builder
  • Salary Lookup
  • Big O Cheat Sheet
  • Total Comp Calculator
  • View All →
  • Interview Questions
  • Google Questions
  • Amazon Questions
  • Microsoft Questions
  • Meta Questions
  • Apple Questions
  • TikTok Questions
  • View All →
© 2026 Interview Solver, Inc. All rights reserved.