Rotate String by K

Medium
5 views 24 Jan 2026
A string s and integer k are provided. Rotate string to the right by k positions and output....

Rotate String Right

Medium
4 views 24 Jan 2026
For each testcase you get string s and integer k. Rotate string to the right by k and output the new string....

Boolean XOR Expression

Hard
4 views 24 Jan 2026
A boolean string s of 0/1 and a boolean string t of 0/1 are provided, same length. Treat them as bits and compute (s XOR t) as a new string. Output it....

Decode Nested Repeat

Hard
5 views 24 Jan 2026
A string is provided in form like 3[a2[c]] where number means repeat. Decode and output the final string....

Normalize Number String

Hard
4 views 24 Jan 2026
A number is provided as string. It may have + sign, leading zeros, and decimal part. Normalize it: remove +, remove extra leading zeros, remove trailing zeros in decimal, and if it becomes -0 or 0.0 t...

Remove Pattern Repeatedly

Hard
5 views 24 Jan 2026
Input provides {x}. Remove every occurrence of p from s while scanning left to right (like stack remove). Output final string....

Reverse String

Easy
4 views 24 Jan 2026
Input is a single string s is provided (no trailing spaces needed). Output the reversed string....

Rolling Hash Variable

Hard
4 views 24 Jan 2026
You're given {x}. Compute rolling hash: h=0; for each char c: h=(h*B+ord(c))%M. Output h....

Split Array Largest Sum

Hard
4 views 24 Jan 2026
You're given {x}. Split array into m non-empty continuous parts to minimize the maximum part sum. Output that minimum possible value....

String Length Info

Easy
4 views 24 Jan 2026
Input is a single string s is provided (can contain spaces). Output its length, first character and last character. If string is empty, output 0 - -....

Unescape Simple String

Hard
4 views 24 Jan 2026
A quoted string is provided. It can contain escapes: \\\\n, \\\\t, \\\\\\\\, and \\\\\. Unescape it and output two integers: length and checksum (sum of char codes modulo 256)."....

Wildcard Match

Hard
4 views 24 Jan 2026
You get {x}. Output YES if pattern matches whole string else NO....

Check Array Sorted For Each Case

Medium
4 views 24 Jan 2026
Consider {x}. Each testcase has n and array. Output YES if array is non-decreasing else NO....

Remove Adjacent Duplicates

Medium
5 views 24 Jan 2026
For each testcase you get string s. Repeatedly remove adjacent equal characters using a stack idea. Output final string (or EMPTY)....

Remove All Digits

Medium
4 views 24 Jan 2026
A string s is provided. Remove all digits (0-9) and output remaining string....

Reverse Map Count

Medium
5 views 24 Jan 2026
You're given {x}. Build reverse mapping: for each value, how many keys map to it. Output values sorted with their counts....

Rotate List Right

Medium
5 views 24 Jan 2026
Input provides {x}. Rotate list to the right by k positions and output....

Run Length Decode

Medium
5 views 24 Jan 2026
An encoded string is provided like a3b2c (letters with optional number). Decode and output the original string....

Run Length Encode

Medium
4 views 24 Jan 2026
A string s is provided. Compress it using run-length encoding as: char followed by count (only when count>1). Output encoded string....

String to Integer Parser

Medium
5 views 24 Jan 2026
A string s is provided (maybe with leading spaces and sign). Parse first integer like simple atoi. If no number, output 0....

Connectivity Queries (DSU)

Hard
4 views 24 Jan 2026
Consider {x}. Make DSU class with find and union. Queries: UNION u v, ASK u v. For ASK output YES if connected else NO....

Deque Commands With Errors

Hard
4 views 24 Jan 2026
You will receive q commands: PUSHFRONT x, PUSHBACK x, POPFRONT, POPBACK. Start empty. On POP when empty, output ERROR and stop. Else after all commands output final deque as space-separated or EMPTY....

Detect Uninitialized Read

Hard
5 views 24 Jan 2026
You will receive n statements in a tiny language: 'set x v' or 'add x y' meaning x = x + y. If add uses a variable that was never set before (for x or y), count it as a bad read. Output badReadCount....

Find First Unset Variable

Hard
5 views 24 Jan 2026
You will receive q queries like GET name or SET name value. Maintain variables in a dict. For each GET, output value if present else UNSET....

Huge Power Mod (Exponent as String)

Hard
5 views 24 Jan 2026
Integers a and m are provided, and exponent b is provided as a very large decimal string. Output (a^b) % m....

JSON Type Counter

Hard
5 views 24 Jan 2026
A JSON array is provided in one line, like [1,2,true,null]. Count how many numbers, strings, booleans, and null values. Output counts in order: num str bool null....

Longest Palindromic Substring Length

Hard
4 views 24 Jan 2026
A string s is provided (no spaces). Compute length of longest palindromic substring. Use linear-time method....

Merge Two Score Lists

Easy
5 views 24 Jan 2026
We have {x}. Make final score for each key as sum of scores from both lists (missing is 0). Output keys sorted with their final score....

Minimum Insertions Palindrome

Hard
5 views 24 Jan 2026
A string s is provided (no spaces). Compute minimum insertions needed to make it a palindrome. Output the number....

Nested Dictionary Path

Hard
4 views 24 Jan 2026
You will receive q commands on a nested dictionary: SET path value, GET path. Path is dot separated like a.b.c. For GET output value if exists else NOT FOUND....

Pack Bytes to Hex

Hard
5 views 24 Jan 2026
Given {x}, .255). Put them into a bytes object and output hex string in uppercase....

Range Add Queries (Difference Array)

Hard
6 views 24 Jan 2026
For each testcase you get n and q updates. Each update adds val to all positions l..r (1-based). After all updates output final array....

Remove Spaces

Easy
4 views 24 Jan 2026
A string s is provided. Remove all space characters and output the new string....

Run-Length Compression

Hard
5 views 24 Jan 2026
Input provides {x}. Example aaabb becomes a3b2. Output compressed string....

Smallest Rotation

Hard
9 views 24 Jan 2026
A string s is provided. Consider all rotations of s. Output the lexicographically smallest rotation....

Smallest Subsequence of Length K

Hard
5 views 24 Jan 2026
A string s and integer k are provided. Pick a subsequence of length k (keep order) with smallest lexicographic value. Output that subsequence....

Smallest Window Contains Pattern

Hard
4 views 24 Jan 2026
You get {x}. Compute the length of smallest substring of s that contains all characters of p with at least same counts. If not possible output 0....

Stack Operations

Easy
4 views 24 Jan 2026
Input provides {x}. Start empty list. POP on empty does nothing. At end output size and last element (or EMPTY)....

String Number Add

Easy
4 views 24 Jan 2026
A number is provided as a string x and an integer y is provided. Convert x to int and output x+y....

Swap Values of Two Keys

Easy
5 views 24 Jan 2026
You're given {x}. Then two keys k1 and k2 are provided. If both keys exist, swap their values. Finally output value of k1 and value of k2 (use NA if a key does not exist)....