Substring
Everything on SkillVeris tagged Substring — collected across the glossary, study notes, blog, and cheat sheets.
6 resources across 2 libraries
Study Notes(1)
Interview Questions(5)
What is the Sliding Window Technique?
The sliding window technique maintains a contiguous subrange of an array or string, expanding and contracting its boundaries as it scans, to solve subarray or…
What is the KMP String Matching Algorithm?
The Knuth-Morris-Pratt (KMP) algorithm finds all occurrences of a pattern in a text in O(n + m) time by precomputing a failure function (also called the longes…
What is the Rabin-Karp Algorithm?
Rabin-Karp finds pattern occurrences in a text by hashing the pattern and every equal-length substring of the text using a rolling hash, comparing hash values…
What is the Z-Algorithm for String Matching?
The Z-algorithm computes, for every position in a string, the length of the longest substring starting there that also matches a prefix of the whole string, bu…
How Do You Find the Longest Palindromic Substring?
The expand-around-center approach finds the longest palindromic substring in O(n²) time and O(1) extra space by treating every index (and every gap between ind…