KatInterview

Topic

Strings interview problems

Parsing, matching, palindromes and string transforms. 228 original problems, each with hidden test cases you can run in the browser.

Problems228

60 easy155 medium13 hard

Showing 181–210 of 228 results

  • Apply a phrase-to-replacement map on the original text in one pass, respecting whole-word boundaries and preferring longer matches.

    Auto-gradedtriegreedystring-matching
  • Tests careful string parsing: multiply only the leading numeric token in each line while leaving the rest of the text exactly as-is.

    Auto-gradedstringsparsinglist manipulation
  • Tests the ability to determine whether one integer array appears as an unbroken, in-order block inside a larger array using linear-time pattern matching.

    Auto-gradedKMPpattern matchingarrayssubsequence
  • Tests constructing the immediate successor palindrome by manipulating the left half, handling carries, length transitions, and an upper bound.

    Auto-gradedpalindromesstring-manipulationgreedy
  • Tests string manipulation and character frequency analysis to determine if two strings can become anagrams through optional single-character removal.

    Auto-gradedhash-mapcountinganagrams
  • Tests sliding window technique with hash map indexing to efficiently find the longest substring with all distinct characters.

    Auto-gradedsliding-windowhash-maptwo-pointers
  • Tests the ability to combine classic edit-distance dynamic programming with palindrome structure to find the minimum single-character substitutions needed to make a string palindromic after removing exactly k characters.

    Auto-gradedstringsdynamic-programmingedit-operations
  • Tests whether a candidate can compute the minimum number of single-character insertions needed to transform an arbitrary string into a palindrome using interval DP.

    Auto-gradedstringsdynamic programmingpalindromesedit operations
  • Tests whether a candidate can build a recursive-descent parser for a small boolean expression language and wire it into a first-match rule dispatcher.

    Auto-gradedparsingrecursionstring processing
  • Tests your ability to implement a sequential rule-engine with string normalization, token-set comparison, and strict short-circuit logic across three validation tiers.

    Auto-gradedstringshashingsimulation
  • Tests buffered string parsing over an incremental data source combined with greedy net-balance clearing across a set of financial transfers.

    Auto-gradedstringsgreedy-intervalsdesign-ds
  • Tests filtering by time range, frequency counting with a dictionary, and sorting with multi-level tie-breaking rules.

    Auto-gradedhash-mapsortingstring-parsing
  • Tests digit-by-digit arithmetic with sign handling and carry/borrow logic for adding very large signed integers represented as strings.

    Auto-gradedstring-manipulationmathdigit-arithmetic
  • Tests sliding window technique with hash map to track character positions and find the longest contiguous segment with all distinct characters.

    Auto-gradedsliding-windowhash-maptwo-pointers
  • Tests understanding of edit distance (insert, delete, substitute) by computing the minimum operations needed to transform one palindrome into another, reinforcing dynamic programming on strings.

    Auto-gradedstringsdynamic programmingedit distancepalindromes
  • Tests the ability to tokenize a raw sentence string into normalized word tokens and count how many distinct words appear exactly once.

    Auto-gradedstringstokenizingparsing
  • Tests string encoding with a fixed mapping, hashing for deduplication, and understanding that identical encodings can arise from different inputs.

    Auto-gradedhash-setstring-manipulationencoding
  • Tests string parsing, validation rules, and backtracking to check and generate valid IPv4 addresses from digit strings.

    Auto-gradedbacktrackingvalidationstring-processing
  • Tests the ability to efficiently find the smallest substring containing all required characters using sliding window and hash tables.

    Auto-gradedsliding-windowhash-maptwo-pointers
  • Write a function that converts a plain-text string to HTML with paragraphs, soft line breaks, blockquotes, and strikethrough, handling all edge cases correctly.

    Model answerparsingstring-processingtwo-pass
  • Tests string parsing and bitwise permission logic to identify files that lack write permissions across all user categories.

    Auto-gradedstring-parsingfilteringpermissions
  • Tests sliding window technique with hash maps to find the longest contiguous span of non-repeating characters in a string.

    Auto-gradedsliding-windowhash-maptwo-pointers
  • Tests string parsing, filtering by character parity, tracking maxima with tie-breaking, and handling whitespace edge cases.

    Auto-gradedstring-manipulationlinear-scanedge-cases
  • Tests sliding window technique to find the longest contiguous sequence where the number of unique characters does not exceed a threshold.

    Auto-gradedsliding-windowhash-maptwo-pointers
  • Tests manual implementation of Base64URL decoding and understanding of multi-part token structure with bit-level encoding.

    Auto-gradedencodingparsingbit-manipulation
  • Tests ability to implement both directions of run-length encoding: compressing a plain string into a compact form and expanding it back, handling edge cases carefully.

    Auto-gradedstringsencodingparsing
  • Find the longest contiguous substring where all distinct characters appear with identical frequency.

    Auto-gradedsliding-windowhash-mapfrequency-counting
  • Retrieve text fields from multiple endpoints, parse and validate IPv4 addresses, then rank them by occurrence frequency.

    Model answerstring-parsinghttpvalidationfrequency-counting
  • Tests ability to apply two-pointer sliding window technique with hash map tracking to efficiently find optimal substring boundaries.

    Auto-gradedsliding-windowtwo-pointershash-map
  • Tests ability to identify and count all palindromic substrings using center expansion and understanding of linear-time optimization techniques.

    Auto-gradedpalindromestwo-pointersstring-matching

More topics