Topic
Strings interview problems
Parsing, matching, palindromes and string transforms. 228 original problems, each with hidden test cases you can run in the browser.
60 easy155 medium13 hard
Showing 151–180 of 228 results
Tests efficient sliding-window reasoning to find the longest substring that can be made all one character using at most k single-character replacements.
Auto-gradedsliding-windowstringsfrequency-countingImplement a function that pulls a nested XML document out of a CDATA section and reads an attribute from its root, while blocking XXE and entity-expansion attacks.
Model answerxmlsecurityparsingTests ability to normalize user input and apply multi-field substring filtering across a collection of structured records.
Auto-gradedstringsfilteringcase-insensitiveTests whether a candidate can implement column-by-column addition with carry logic on digit strings, without converting the whole string to a native integer.
Auto-gradedstringsmath-bitssimulationBuild a two-phase pipeline that parses raw server log lines into structured records and filters them using a mini query language of typed prefix tokens.
Model answerparsingregexfilteringdesignTests parsing and evaluating variable assignments in order, handling literals, references, and arithmetic expressions.
Auto-gradedparsingdictionaryexpression-evaluationParse participant data from a CSV string with quoted fields, validate entries, and create a round-robin assignment where no one gives a gift to themselves.
Model answerparsingvalidationalgorithmscsvTests your ability to count every palindromic substring by expanding around centers or applying Manacher's linear-time algorithm.
Auto-gradedstringsdynamic-programmingtwo-pointersTests whether a candidate can apply the sliding window technique with a hash map to find the earliest, longest non-repeating character run in a string.
Auto-gradedsliding-windowhash-maptwo-pointersTests whether you can use the KMP failure function to find the longest palindromic prefix of a string and prepend the minimum number of characters to make it a palindrome.
Auto-gradedstringskmppalindromeTests whole-word, case-insensitive multi-token matching with trie-based scanning and deduplication ordered by a reference list.
Auto-gradedstringshashingtrieTests string scanning, ASCII letter detection, and single-pass maximum tracking with tie handling across whitespace-delimited tokens.
Auto-gradedstringsscanningcase-normalizationtiesTrace identity vs equality across literals, `new String`, `intern`, and constant folding, then compare loop `+`, `StringBuilder`, and `StringBuffer`.
Model answerjavastring-poolimmutabilitystringbuilderTests hash map construction with canonical keys to partition strings by anagram equivalence
Auto-gradedhash-mapsortingstring-manipulationCompare Python lists and tuples across mutability, memory layout, hashability, and idiomatic use, including tricky edge cases.
Model answerpythondata-structuresmutabilityhashabilityTests whether a candidate can apply a sliding window with a character index map to find the longest contiguous run of non-repeating characters.
Auto-gradedsliding-windowhash-maptwo-pointersTests the ability to efficiently enumerate all palindromic substrings using center expansion and handle both odd and even-length cases.
Auto-gradedpalindromestwo-pointersstring-manipulationTests multi-pattern substring search, hash-based indexing, and greedy reconciliation with priority-based tie-breaking across two matching strategies.
Auto-gradedstring-matchinghash-mapgreedyaho-corasickTests implementation of a stateful tokenizer that learns merge operations by iteratively combining frequent adjacent pairs, then applies those rules to encode and decode text.
Auto-gradedtokenizationgreedystate-managementParse "id:command" log lines, accumulate weighted scores per task with a hash map, and keep only tasks that completed.
Auto-gradedstringshash-mapsimulationparsingTests whether a candidate can reduce pairwise comparisons to a sign sequence and count all overlapping pattern matches in linear time using KMP.
Auto-gradedstring-matchingkmparrayssliding-windowTests whether a candidate can simulate 2D movement on a grid and determine if a sequence of directional steps nets zero displacement.
Auto-gradedstringssimulationmath-bitsTests string validation logic, character classification, case-insensitive pattern matching, and consecutive character counting.
Auto-gradedvalidationstring-processingpattern-matchingTests two-pointer traversal, sequence invariants, and directional movement constraints with O(n) time and O(1) space.
Auto-gradedtwo-pointersgreedyinvariantsTests your ability to apply character-to-code substitution and reverse it using an inverted dictionary for O(1) chunk lookups.
Auto-gradedstringshash-mapsimulationTests anagram grouping combined with string parsing and multi-key sorting to build and rank clusters of anagrammatically related words from a structured input.
Auto-gradedstringsanagram groupingsortingparsingTests efficient character frequency counting and consistent tie-breaking using fixed-size auxiliary space.
Auto-gradedstringsarraysfrequency-countingTests whether a candidate can spot a trailing-comma output bug and a quadratic string-building performance problem, then write a correct, efficient fix.
Auto-gradedstringsperformancejoinsWrite five short functions covering string repetition, list transformation, FizzBuzz, word counting, and finding the second-largest unique integer.
Model answerpythonfundamentalsedge-casesParse a small line-based language of assignments and flat if-else blocks, then emit a deterministic three-address IR with temporaries and jump labels.
Model answerparsingcompilerintermediate-representation