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
Copy file name to clipboardExpand all lines: Data Structures/Graphs/WordBoggle.cpp
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,40 @@
1
+
// Given a dictionary of distinct words and an M x N board where every cell has one character. Find all possible words from the dictionary that can be formed by a sequence of adjacent characters on the board. We can move to any of 8 adjacent characters, but a word should not have multiple instances of the same cell.
2
+
// Example 1:
3
+
4
+
// Input:
5
+
// N = 1
6
+
// dictionary = {"CAT"}
7
+
// R = 3, C = 3
8
+
// board = {{C,A,P},{A,N,D},{T,I,E}}
9
+
// Output:
10
+
// CAT
11
+
// Explanation:
12
+
// C A P
13
+
// A N D
14
+
// T I E
15
+
// Words we got is denoted using same color.
16
+
// Example 2:
17
+
18
+
// Input:
19
+
// N = 4
20
+
// dictionary = {"GEEKS","FOR","QUIZ","GO"}
21
+
// R = 3, C = 3
22
+
// board = {{G,I,Z},{U,E,K},{Q,S,E}}
23
+
// Output:
24
+
// GEEKS QUIZ
25
+
// Explanation:
26
+
// G I Z
27
+
// U E K
28
+
// Q S E
29
+
// Words we got is denoted using same color.
30
+
31
+
// Companies
32
+
// Amazon Directi Facebook Google MakeMyTrip Microsoft Nvidia Yahoo
Copy file name to clipboardExpand all lines: Data Structures/Trees/Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.cpp
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,17 @@
1
+
// Leetcode problem for Binary Tree
2
+
// 105. Construct Binary Tree from Preorder and Inorder Traversal
3
+
4
+
// Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return the binary tree.
0 commit comments