5 views
24 Jan 2026
A string s and integer k are provided. Rotate string to the right by k positions and output....
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....
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....
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....
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...
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....
4 views
24 Jan 2026
Input is a single string s is provided (no trailing spaces needed). Output the reversed string....
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....
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....
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 - -....
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)."....
4 views
24 Jan 2026
You get {x}. Output YES if pattern matches whole string else NO....
4 views
24 Jan 2026
Consider {x}. Each testcase has n and array. Output YES if array is non-decreasing else NO....
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)....
4 views
24 Jan 2026
A string s is provided. Remove all digits (0-9) and output remaining string....
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....
5 views
24 Jan 2026
Input provides {x}. Rotate list to the right by k positions and output....
5 views
24 Jan 2026
An encoded string is provided like a3b2c (letters with optional number). Decode and output the original string....
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....
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....
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....
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....
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....
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....
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....
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....
4 views
24 Jan 2026
A string s is provided (no spaces). Compute length of longest palindromic substring. Use linear-time method....
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....
5 views
24 Jan 2026
A string s is provided (no spaces). Compute minimum insertions needed to make it a palindrome. Output the number....
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....
5 views
24 Jan 2026
Given {x}, .255). Put them into a bytes object and output hex string in uppercase....
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....
4 views
24 Jan 2026
A string s is provided. Remove all space characters and output the new string....
5 views
24 Jan 2026
Input provides {x}. Example aaabb becomes a3b2. Output compressed string....
9 views
24 Jan 2026
A string s is provided. Consider all rotations of s. Output the lexicographically smallest rotation....
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....
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....
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)....
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....
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)....