Given a two-dimensional array of letters, find whether a given word can be written in any one of the 8 directions. In other words, the word may appear h…
You’re given an R-by-C array of integers that represents a top-down map of a building construction site, where each location in the array represents a o…
Sudoku is a number-placement puzzle. The objective is to fill a 9 x 9 grid with digits so that each column, each row, and each of the nine 3 x 3 sub-gri…
Design a backend system for an e-commerce website that shows a list of merchandise. The system should focus on the browsing aspect, not on how to make p…
You are given an array of uppercase and lowercase English letters, recording , representing a sequence of letters typed by the user. Your task is to cou…
For a grid of black and white cells with rows rows and cols columns, you’re given an array black that contains the [row, column] coordinates of all the…
Given an undirected graph graph that is represented by its adjacency matrix, return whether or not it is possible to add no more than two edges to this…
Given an array of integers numbers , compare the sum of elements on even positions against the sum of elements on odd positions (0-based). Return “even”…
You are given a matrix of integers matrix containing only zeros and ones. Let’s call an x-shape a figure with a center at some cell of matrix and 4 diag…
You have an array of integers audiobooks where audiobooks[i] is the amount of time in minutes needed to listen to the i -th audiobook fully. You are lis…
Each cycle, one of the three events happens: Option 1: If there are at least conversionRate P resources, then the last conversionRate P resources are re…