KatInterview

practice a little every day — you've got this ♡

Strings Interview Problems

Practice 5971 original coding, SQL, system design, machine learning and behavioral problems across 15 topics. Coding and SQL problems run against hidden test cases right in your browser; every problem has hints and a worked solution, free.

5971
Problems
2211
Auto-graded
15
Topics
272
Added today

Showing 151–180 of 187 results

  • StringsMediumAuto-graded
    Minimum Edit Distance to Make String a Palindrome

    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.

    Stringsstringsdynamic programmingpalindromesedit operations
  • StringsHardAuto-graded
    Mini Policy Engine: Boolean Rule Evaluation for Post Routing

    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.

    Stringsparsingrecursionstring processing
  • StringsMediumAuto-graded
    Tiered Identity Validation for Business Onboarding

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

    Stringsstringshashingsimulation
  • StringsMediumAuto-graded
    Chunked Stream Parser and Debt Settlement

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

    Stringsstringsgreedy-intervalsdesign-ds
  • StringsMediumAuto-graded
    Trending Tags in Time Window

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

    Stringshash-mapsortingstring-parsing
  • StringsEasyAuto-graded
    Sum Two Arbitrarily Large Signed Integers as Strings

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

    Stringsstring-manipulationmathdigit-arithmetic
  • StringsMediumAuto-graded
    Maximum Unique Character Window

    Tests sliding window technique with hash map to track character positions and find the longest contiguous segment with all distinct characters.

    Stringssliding-windowhash-maptwo-pointers
  • StringsMediumAuto-graded
    Minimum Edit Distance Between Two Palindromes

    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.

    Stringsstringsdynamic programmingedit distancepalindromes
  • StringsEasyAuto-graded
    Count Distinct Words in a Sentence

    Tests the ability to tokenize a raw sentence string into normalized word tokens and count how many distinct words appear exactly once.

    Stringsstringstokenizingparsing
  • StringsEasyAuto-graded
    Count Distinct Morse Code Representations

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

    Stringshash-setstring-manipulationencoding
  • StringsMediumAuto-graded
    IPv4 Address Checker and Builder

    Tests string parsing, validation rules, and backtracking to check and generate valid IPv4 addresses from digit strings.

    Stringsbacktrackingvalidationstring-processing
  • StringsMediumAuto-graded
    Minimum Window Containing All Target Characters

    Tests the ability to efficiently find the smallest substring containing all required characters using sliding window and hash tables.

    Stringssliding-windowhash-maptwo-pointers
  • StringsMediumAuto-graded
    Filter Files Without Write Access

    Tests string parsing and bitwise permission logic to identify files that lack write permissions across all user categories.

    Stringsstring-parsingfilteringpermissions
  • StringsMediumAuto-graded
    Maximum Distinct Character Window

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

    Stringssliding-windowhash-maptwo-pointers
  • StringsEasyAuto-graded
    First Longest Word with Even Character Count

    Tests string parsing, filtering by character parity, tracking maxima with tie-breaking, and handling whitespace edge cases.

    Stringsstring-manipulationlinear-scanedge-cases
  • StringsMediumAuto-graded
    Maximum Substring Length with Character Limit

    Tests sliding window technique to find the longest contiguous sequence where the number of unique characters does not exceed a threshold.

    Stringssliding-windowhash-maptwo-pointers
  • StringsHardAuto-graded
    Parse Token Components Without External Libraries

    Tests manual implementation of Base64URL decoding and understanding of multi-part token structure with bit-level encoding.

    Stringsencodingparsingbit-manipulation
  • StringsEasyAuto-graded
    Compress and Decompress a Run-Length Encoded String

    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.

    Stringsstringsencodingparsing
  • StringsEasyAuto-graded
    Maximum Length of Equally Frequent Character Substring

    Find the longest contiguous substring where all distinct characters appear with identical frequency.

    Stringssliding-windowhash-mapfrequency-counting
  • StringsMediumAuto-graded
    Maximum Span with Limited Character Variety

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

    Stringssliding-windowtwo-pointershash-map
  • StringsMediumAuto-graded
    Palindromic Substring Counter

    Tests ability to identify and count all palindromic substrings using center expansion and understanding of linear-time optimization techniques.

    Stringspalindromestwo-pointersstring-matching
  • StringsMediumAuto-graded
    Word Lookup in a Large Lexicon

    Tests efficient membership checking using hash sets, understanding amortized preprocessing costs, and recognizing algorithmic trade-offs for large-scale lookups.

    Stringshash-tablessetsoptimizationmembership-testing
  • StringsEasyAuto-graded
    Minimum Single-Character Edits to Make a Palindrome

    Tests whether a candidate can count the minimum number of single-character insertions or deletions needed to transform a string into any palindrome.

    Stringsstringsdynamic programmingedit operations
  • StringsMediumAuto-graded
    Find Next Palindrome Number

    Tests string manipulation and numeric logic to determine if a number is palindromic and compute the next larger palindrome efficiently.

    Stringspalindromestring-manipulationgreedy
  • StringsMediumAuto-graded
    Strict Numeric String Recognizer

    Tests whether candidates can implement a precise single-pass parser that accepts only well-formed integers, decimals, and scientific notation strings.

    Stringsstringsparsingtwo-pointers
  • StringsEasyAuto-graded
    Generate Number Sequence with Divisibility Rules

    Tests basic control flow, modular arithmetic, and string formatting by transforming numbers according to divisibility conditions.

    Stringsconditionalsmoduloiteration
  • StringsMediumAuto-graded
    Distribute and Expand Algebraic Products

    Tests recursive parsing, the distributive property of multiplication over addition, and constructing expanded expressions from nested operations.

    Stringsparsingrecursionstring-manipulation
  • StringsMediumAuto-graded
    Minimum Window with K Distinct Characters

    Tests sliding window technique with character frequency tracking to find the smallest substring containing exactly k distinct characters.

    Stringssliding-windowhash-maptwo-pointers
  • StringsMediumAuto-graded
    First Unique Character and Highest Class Average

    Tests hash-based frequency counting for strings and grouped numeric aggregation with exact average comparison.

    Stringshash-mapstring-manipulationaggregation
  • StringsHardAuto-graded
    Greedy Token Substitution with Longest Prefix Matching

    Tests prefix-tree construction, greedy string scanning, and longest-match selection for token-based text transformation.

    Stringstriegreedystring-processing