Coding Exercise Posts - page 10 of 43

Recent posts

Matrix Search

less than 1 minute read

Given a two-dimensional integer matrix, where every row and column is sorted in ascending order, find the kth (0-indexed) smallest number.

Matrix Search Sequel

less than 1 minute read

Given a two-dimensional integer matrix, where every row and column is sorted in ascending order, return whether an integer target exists in the matrix.

Largest Square Submatrix

less than 1 minute read

Given a two-dimensional integer matrix, return the area of the largest square of 1 s.

Largest Square Matrix with Same Value

less than 1 minute read

Given a two-dimensional list of integers matrix, find the largest k × k submatrix such that all of its elements are the same value, and return the k.

IP Address Combinations

less than 1 minute read

Given a string of digits ip, generate all possible valid IP address combinations and return them in sorted order.

Dropped Sensor Metric

1 minute read

You are given two lists of integers a and b representing sensor metrics. Each list contains unique integers and a ≠ b. One of the lists contains accurate sen...

Delete Characters to Equalize Strings

less than 1 minute read

Given two lowercase alphabet strings a and b, consider an operation where we delete any character in either string. Return the minimum number of operations r...

Cycle Detection in a Matrix

1 minute read

You are given a two-dimensional list of integers matrix. Return whether you can start from some cell, move adjacent to neighboring cells (up, down, left, rig...

Count Square Submatrices

less than 1 minute read

Given a two-dimensional list of integers matrix containing 1s and 0s, return the total number of square submatrices with all 1 s.

Add Binary Numbers

less than 1 minute read

Given two strings a and b that represent binary numbers, add them and return their sum, also as a string.

0-1 Knapsack

1 minute read

You are given two lists of integers weights and values which have the same length and an integer capacity. weights[i] and values[i] represent the weight and ...