You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 0236 |[Lowest Common Ancestor of a Binary Tree](src/main/ts/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree/solution.ts)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 61 | 75.97
| 0211 |[Design Add and Search Words Data Structure](src/main/ts/g0201_0300/s0211_design_add_and_search_words_data_structure/solution.ts)| Medium | String, Depth_First_Search, Design, Trie | 450 | 92.88
1181
+
| 0212 |[Word Search II](src/main/ts/g0201_0300/s0212_word_search_ii/solution.ts)| Hard | Top_Interview_Questions, Array, String, Matrix, Backtracking, Trie | ew 150 | ew 150 Trie
| 0215 |[Kth Largest Element in an Array](src/main/ts/g0201_0300/s0215_kth_largest_element_in_an_array/solution.ts)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Heap_Priority_Queue, Divide_and_Conquer, Quickselect, Data_Structure_II_Day_20_Heap_Priority_Queue, Top_Interview_150_Heap, Big_O_Time_O(n\*log(n))_Space_O(log(n)) | 4 | 99.64
1755
+
| 0212 |[Word Search II](src/main/ts/g0201_0300/s0212_word_search_ii/solution.ts)| Hard | Top_Interview_Questions, Array, String, Matrix, Backtracking, Trie | ew 150 | ew 150 Trie
1756
+
| 0211 |[Design Add and Search Words Data Structure](src/main/ts/g0201_0300/s0211_design_add_and_search_words_data_structure/solution.ts)| Medium | String, Depth_First_Search, Design, Trie, Top_Interview_150_Trie | 450 | 92.88
There are a total of `numCourses` courses you have to take, labeled from `0` to `numCourses - 1`. You are given an array `prerequisites` where <code>prerequisites[i] = [a<sub>i</sub>, b<sub>i</sub>]</code> indicates that you **must** take course <code>b<sub>i</sub></code> first if you want to take course <code>a<sub>i</sub></code>.
6
+
7
+
* For example, the pair `[0, 1]`, indicates that to take course `0` you have to first take course `1`.
8
+
9
+
Return _the ordering of courses you should take to finish all courses_. If there are many valid answers, return **any** of them. If it is impossible to finish all courses, return **an empty array**.
There are a total of 4 courses to take. To take course 3 you should have finished both courses 1 and 2. Both courses 1 and 2 should be taken after you finished course 0.
31
+
So one correct course order is [0,1,2,3]. Another correct ordering is [0,2,1,3].
Design a data structure that supports adding new words and finding if a string matches any previously added string.
6
+
7
+
Implement the `WordDictionary` class:
8
+
9
+
*`WordDictionary()` Initializes the object.
10
+
*`void addWord(word)` Adds `word` to the data structure, it can be matched later.
11
+
*`bool search(word)` Returns `true` if there is any string in the data structure that matches `word` or `false` otherwise. `word` may contain dots `'.'` where dots can be matched with any letter.
Given an `m x n``board` of characters and a list of strings `words`, return _all words on the board_.
6
+
7
+
Each word must be constructed from letters of sequentially adjacent cells, where **adjacent cells** are horizontally or vertically neighboring. The same letter cell may not be used more than once in a word.
0 commit comments