KatInterview

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

Strings Interview Problems

Practice 5966 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.

5966
Problems
2209
Auto-graded
15
Topics
271
Added today

Showing 211–227 of 227 results

  • StringsMediumModel answer
    Generator-Based Parser for Structured Log Streams

    Build a memory-efficient Python generator that parses log records with timestamps and key-value pairs, handling quoted strings with escapes.

    Stringsparsinggeneratorsstring-processingtext-processing
  • 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
  • StringsMediumModel answer
    Remove Paths by Prefix Hierarchy

    Remove all paths that match or fall under any deletion target in a hierarchical filesystem-like structure.

    Stringstrieprefix-matchingstring-processing
  • 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
  • StringsMediumAuto-graded
    Decode a Run-Length Encoded String With Nested Groups

    Tests the ability to parse and expand a run-length encoded string that contains arbitrarily nested bracket groups, combining stack-based parsing with string manipulation.

    Stringsstringsparsingstackrun-length encoding
  • StringsEasyAuto-graded
    Parse and Evaluate Simple Arithmetic Tokens

    Tests the ability to tokenize a raw arithmetic string into numbers and operators, then evaluate left-to-right respecting only + and - operations.

    Stringsstringstokenizingparsing
  • StringsMediumAuto-graded
    Peak Occurrence Count of a Bounded Substring

    Tests whether a candidate can reduce a multi-length sliding-window problem to a single window size and efficiently track distinct-character counts.

    Stringssliding-windowhash-mapstrings
  • StringsEasyAuto-graded
    Shortest Palindromic Superstring by Suffix–Prefix Overlap

    Tests understanding of palindromic structure by finding the minimum characters to append to a string to make the whole string a palindrome.

    Stringsstringspalindrometwo pointers
  • StringsMediumAuto-graded
    Shortest Substring Containing All Required Characters

    Tests the sliding window pattern with frequency counting to find the shortest substring of one string that covers every character (with multiplicity) of another.

    Stringssliding-windowhash-maptwo-pointers
  • StringsMediumAuto-graded
    Group Cipher Variants by Scrambled Key

    Tests anagram-grouping on structured strings with a prefix/suffix schema, requiring careful key extraction, normalization, and tie-breaking for sorted output.

    Stringsstringsanagram groupingsortingparsing
  • StringsMediumAuto-graded
    Group Scrambled Words by Shared Anagram Fingerprint

    Tests the ability to canonicalize strings into sorted-character keys and cluster words that are anagrams of each other, with a precise tie-breaking rule for deterministic output.

    Stringsstringsanagramshash mapsorting