Coding Exercise Posts - page 8 of 43

Recent posts

Characters in Each Bracket Depth

1 minute read

You are a given a string s containing "X", "(", and ")". The string has balanced brackets and in between there are some "X"s along with possibly nested brack...

Compressed Vector Product

1 minute read

You are given two integer lists a and b where each list represents a vector in run-length encoded form. For example, a vector [1, 1, 1, 1, 2, 2, 2, 2, 2] is ...

Circular Greater Element to the Right

less than 1 minute read

You are given a list of integers nums. Return a new list of the same length where the value at index i is set to the next element greater than nums[i] to its...

Reverse Linked List Groups

less than 1 minute read

Given a singly linked list node, and an integer k, reverse every k contiguous group of nodes.

Submajority Vote

less than 1 minute read

You are given a list of integers nums where each number represents a vote to a candidate.

Contiguously Increasing Numbers

less than 1 minute read

Given two integers start and end, return a sorted list of integers such that every number e is between start ≤ e ≤ end and the digits of e are contiguously i...

Stacks

1 minute read

Given a list of list of positive integers stacks, you can take any stack(s) in stacks and pop any number of elements. Return the maximum sum that can be achi...

Set Split

1 minute read

Given a list of positive integers nums, return whether you can divide the list into two groups a and b such that:

Palindrome Splitting

less than 1 minute read

Given a string s, return the number of ways to partition the string such that each part is a palindrome.

Bulk Shift Letters

1 minute read

You are given a lowercase alphabet string s and a list of integers shifts. Each element shifts[i] means to shift the first i + 1 letters of s by shifts[i] po...