2 views
24 Jan 2026
Read n integers. Output the sum....
4 views
24 Jan 2026
Read n integers. Output minimum and maximum in one line....
3 views
24 Jan 2026
Read n integers. Output them in reverse order....
2 views
24 Jan 2026
Read n integers. Count how many are > 0 and output count....
2 views
24 Jan 2026
Read n integers and a target x. Output the first index (0-based) where x appears, else -1....
2 views
24 Jan 2026
Read n integers and value x. Remove all x and output remaining numbers. If nothing left output EMPTY....
3 views
24 Jan 2026
Read q commands: PUSH x or POP. Start empty list. POP on empty does nothing. At end output size and last element (or EMPTY)....
3 views
24 Jan 2026
Read two lists A and B. Output concatenated list A followed by B....
2 views
24 Jan 2026
Read n integers. Output YES if list is non-decreasing else NO....
2 views
24 Jan 2026
Read n integers. Build a new list of size n-1 where b[i]=a[i]+a[i+1]. Output b (or EMPTY if n...
3 views
24 Jan 2026
Read n integers and k. Rotate list to the right by k positions and output....
3 views
24 Jan 2026
Read n integers and q queries l r (1-based). Output sum of each range....
2 views
24 Jan 2026
Read n integers and target T. Output YES if there exist i...
3 views
24 Jan 2026
Read n integers. Compress as pairs value count for consecutive equal values. Output pairs in new lines....
3 views
24 Jan 2026
Read n integers. Remove duplicates but keep first occurrence order. Output the new list....
3 views
24 Jan 2026
Read n integers. Output the second largest distinct value, or NONE if not exists....
6 views
24 Jan 2026
Read n bits (0/1). Compute longest consecutive 1s length....
3 views
24 Jan 2026
Read n positive integers and target S. Output YES if there exists a subarray with sum exactly S else NO....
2 views
24 Jan 2026
Read n integers. Sort them by frequency ascending, if tie by value ascending. Output sorted list....
2 views
24 Jan 2026
Read n integers. Move all zeros to end keeping order of non-zeros. Output result....
2 views
24 Jan 2026
Read n integers and pivot x. Output list such that all x. Keep relative order inside each group....
3 views
24 Jan 2026
Read r and c and then matrix. Output transpose matrix (c rows each has r numbers)....
2 views
24 Jan 2026
Read r and c and a matrix. Output elements in spiral order....
2 views
24 Jan 2026
Read n integers. If an element appears more than n/2 times, output it else output NONE....
5 views
24 Jan 2026
Read n integers and k (1-based). Compute kth smallest element using quickselect style and output it....
3 views
24 Jan 2026
Read n integers. Output length of longest increasing subsequence....
3 views
24 Jan 2026
Read n integers and window size k. For each window output maximum. Use deque logic....
3 views
24 Jan 2026
Read n bar heights. Compute the largest rectangle area in histogram and output it....
6 views
24 Jan 2026
Read n heights. Water trapped between bars should be calculated and printed....
3 views
24 Jan 2026
Read n integers and k. Count subarrays whose sum is divisible by k....
3 views
24 Jan 2026
Read n integers where a[i] is max jump length from i. Output minimum jumps from 0 to n-1 or -1 if not possible....
3 views
24 Jan 2026
Read n integers and integer k. Count number of pairs (i...
5 views
24 Jan 2026
Read n integers and m parts. Split array into m non-empty continuous parts to minimize the maximum part sum. Output that minimum possible value....
3 views
24 Jan 2026
Read n integers (can be negative). Compute maximum subarray sum in circular array and output it....
4 views
24 Jan 2026
Read n integers and k. Output k elements with highest frequency. If tie, smaller number first. Output in order of frequency desc then number asc....