Coding Exercise Posts - page 17 of 43

Recent posts

Web Browser

1 minute read

Implement a web browser with the following methods:

Valid N Queens

1 minute read

The n queens puzzle asks to place n queens on an n×n chessboard so that no two queens are attacking each other.

Three Player Coin Game

1 minute read

You are given a list of non-negative integers piles where each piles[i] represents the number of coins on pile i. In each move, you can do the following unti...

Split List to Minimize Largest Sum

less than 1 minute read

Given a list of non-negative integers nums and an integer k, you can split the list into k non-empty sublists.

Skydivers

1 minute read

You are given a list of integers nums where each value represents a group of people looking to skydive together. You are also given k representing the number...

Rate Limiter

2 minute read

Implement a rate limiter that limits users’ requests with the following methods:

Partition Tree

less than 1 minute read

Given the root to a binary tree root, return a list of two numbers where the first number is the number of leaves in the tree and the second number is the nu...

Maximize Binary String Score

1 minute read

You are given a binary string s containing "1"s and "0"s. Consider splitting the string into two non-empty substrings such that a + b = s. The score of this ...

Majority Vote

less than 1 minute read

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

Lowest Sum of Pair Larger than Target

less than 1 minute read

You are given a list of integers nums and an integer target. Return the lowest sum of pair of numbers that is greater than target. You can assume that a solu...

Longest Even Value Path

less than 1 minute read

Given a binary tree root, return the longest path consisting of even values between any two nodes in the tree.