Coding Exercise Posts - page 14 of 43

Recent posts

Contiguous Intervals

less than 1 minute read

You are given a list of unique integers nums. Return a sorted two dimensional list of integers where each list represents an inclusive interval summarizing i...

Condo Developers

2 minute read

You are given a two-dimensional integer matrix, where matrix[r][c] represents the height of a condominium in a city.

Circular Queue

2 minute read

Implement a circular queue with the following methods:

Bomber Man

less than 1 minute read

You are given a two-dimensional integer matrix of 1s and 0s, where a 1 represents a bomb and 0 represents an empty cell. When a bomb explodes, all the spaces...

Zipped Iterator

less than 1 minute read

Implement a zip iterator of two lists of integers a and b where

Underground Tunnel

1 minute read

Implement a data structure with the following methods:

Swap Kth Node Values

less than 1 minute read

You are given a singly linked list node and an integer k. Swap the value of the k-th (0-indexed) node from the end with the k-th node from the beginning.

Reverse Graph

1 minute read

Given a directed graph represented as an adjacency list, return its reverse so if an edge goes from A to B, it now goes from B to A.

Removing Parentheses

less than 1 minute read

Given a string of parentheses s, return the minimum number of parentheses to be removed to make the string balanced.

Partition String

less than 1 minute read

Given a lowercase alphabet string s, partition s into as many pieces as possible such that each letter appears in at most one piece and return the sizes of t...

Number of Islands

1 minute read

Given a two-dimensional integer matrix of 1s and 0s, return the number of “islands” in the matrix. A 1 represents land and 0 represents water, so an island i...