Coding Exercise Posts - page 20 of 43

Recent posts

Univalue Tree Count

less than 1 minute read

A univalue tree is a tree where all nodes under it have the same value.

Unique People in Contact List

1 minute read

You are given a two-dimensional list of strings contacts. Each element contacts[i] represents the list of emails for contact i. Contact i is considered a dup...

Unique Occurrences

1 minute read

Given a list of integers nums, return whether the number of occurrences of every value in the array is unique.

Unique Integers in Sorted List

less than 1 minute read

Given a list of sorted integers nums return the number of unique integers in the list.

Unique Fractions

1 minute read

You are given a list of lists fractions where each list contains [numerator, denominator] which represents the number numerator / denominator.

Unique Ab Strings

less than 1 minute read

You are given a string s of "a" and "b"s. "a"s can stay "a" or turn into "b", but "b"s can’t change.

Unidirectional Word Search

less than 1 minute read

Given a two-dimensional matrix of characters board and a string target, return whether the target can be found in the matrix by going left-to-right, or up-to...

Ugly Number

less than 1 minute read

Given an integer n, return whether its prime factors only include 2, 3 or 5.

Uber Pool

1 minute read

You are given a two-dimensional integer list requested_trips containing [start_x, end_x, num_passengers], and an integer capacity. Each requested trip asks t...

Twin Trees

1 minute read

Given two binary trees, root0 and root1, return whether their structure and values are equal.

Turtle of Wall Street

1 minute read

You are given a list of integers nums representing stock prices of a company in chronological order. You can buy at most one share of stock per day, but you ...