819. Most Common Word
1232. Check If It Is a Straight Line
1232. Check If It Is a Straight Line
Description
You are given an arraycoordinates
, coordinates[i] = [x, y]
, where [x, y]
represents the coordinate of a point. Check if these pointsmake a straight line in the XY plane.
489. Robot Room Cleaner
359. Logger Rate Limiter
480. Sliding Window Median
245. Shortest Word Distance III
245. Shortest Word Distance III
Description
Given an array of strings wordsDict
and two strings that already exist in the array word1
and word2
, return the shortest distance between the occurrence of these two words in the list.
1028. Recover a Tree From Preorder Traversal
1028. Recover a Tree From Preorder Traversal
Description
We run a preorder depth-first search (DFS) on the root
of a binary tree.
311. Sparse Matrix Multiplication
311. Sparse Matrix Multiplication
Description
Given two sparse matrices mat1
of size m x k
and mat2
of size k x n
, return the result of mat1 x mat2
. You may assume that multiplication is always possible.