-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path31DaysChallenge.txt
152 lines (136 loc) · 3.86 KB
/
31DaysChallenge.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Day1
1) atm 25min
2) enormous input test 11:44 11:50 6min
3) 11:53 12:15 18min
learnt about BigInteger
4) 12:19 12:22 3min
5) 12:22 12:25 3min Arrays.sort complexity is nLogn
it uses comparison sort & in java 7, it can be o(n^2)
6) 12:29 12:32 3min
7) 12:33 12:36 3min
8) 12:45 12:54 9min
9) 12:55 12:56 1min
10) 1:00
11) 1:03 1:16 13min
12) 1:17 1:21 5min
13) 1:22 1:26 4min
14) 3:56 3:58 2min
15) 4:00 4:03 3min
16) 4:08 4:12 4min
Day2
1) 11:17 11:20 3min
2) skip
3) 11:25 11:28 3min
4) 11:40 11:54 14min
5) 12:04 12:15 11min
6) 12:15 12:19 4min
7) 12:20 skip infix to postfix
8) 6:11 6:14 3min
9) 6:15 6:20 5min
10) 6:21 6:26 5min
11) 6:31 6:39 8min
12) 6:43 6:50 7min
13) 7:37 7:39
14) 7:41 7:56 15min
15) 8:00 8:08 7min
16) 8:09 8:15 6min
Day3
1) 11:23 skip
2) 12:29 11:35 6min
3) 11:36 skip
4) 10:00 13min
5) 10:15 10:21 6min
6) 10:25 10:31 6min
7) 10:32 10:42 10min
8) 10:53 10:59 6min
Day5
1) 2:30 3:12 42min Merge Binary Tree
2) 3:18 3:32 14min Univalue tree
3) 3:44 3:51 8min Search in a Binary Search Tree
4) 3:55 4:36 40min N-ary Binary Tree Post Order traversal without recursion
5) 4:45 5:01 15min Convert sorted array into binary tree
6) 5:30 5:35 5min N-ary Binary Tree Pre Order traversal
7) 5:40 5:50 10min Maximum depth of n-ary tree
8) 5:50 5:54 4min Maximum dpeth of binary tree
9) 5:55 6:20 25min Compare leaf nodes of two trees
10) 6:31 6:56 25min Increasing Order from Inorder of binary tree
Day 6
done -> 1) Find the largest palindrome in a given string.
done -> 2) Implement queue using two stacks.
done -> 3) Find the middle element of the linked lists in a single pass (you can only traverse the list once).
done -> 4) N numbers ranging From 1 to N are given, there is exactly one number missing and exactly one is repeated find the repeated and missing number.
done -> 5) You have an array of integers. Find that index for which sum of all the elements before it will be equal to sum of all elements after it.
done -> 6) Find minimum value in a binary tree.
done -> 7) Convert a binary tree to its mirror.
done -> 8) Permutations of a string
done -> 9) Length of the longest common subsequence for two given strings
done -> 10) Sorting an array of pairs
11) sort array of squares 5min
12) Sort Array By Parity
Day 7
1) 12:15 12:29 14 min
2) 1:45 1:49 4min
3) 1:50 1:56 6min
4) 11:23 11:33 4min
5) 11:34 11:42 8min
Day 8
1) merge two sorted list 30 mins
2) delete node
3) 5min
4) odd even level difference
5 ) height of tree
5th feb
1) merge two sorted list
2) remove duplicates 4:35 4:43 8min
3) detect loop in list 5min
4) remove key from list
5) pallindrome of lists 15min
6) intersection of two lists 20mins
7) Design list skip
8) 11:20
6th Feb
1) add two linked List 25min
2) linked list components 30mins
3) split list in parts 44mins
4) odd even list 25min
5) swap node pairs 30mins
6) flatten skip
7) email address 30mins
8) toLowerCase 15mins
9) morse code 10mins
10) Robot Return to Origin 6mins
11) reverse words in a string 25mins
12) reverse string 5mins
13)
9th Feb
Maximum absolute difference 46min
Pascal triangle 10min
kth row Pascal 47min
Feb 12
Sorted insert position 11min
Rotated Sorted Search 10min
Power function skip
Under Root Function 10min
Matrix Search 25min
Make it pallindromic 22min
Count and Say 50min
ZigZag string 29min
multiply two strings 1 hours - skipped
3 Sum Zero 27min
nearest three Sum 23min
intersection of sorted array13min
Remove Duplicates from Sorted Array 26min
same above question for LL 10min
pallindrome LL 26min
Feb 13
1 Merge Two Sorted lists 21min
2 Remove element from array 14min
3 Sort by color 8min
4 remove duplicates II skip
5 array 3 pointers 11min
6 reverse list by k nodes 20min
7 add two numbers as list 24min
8 remove nth node from end 14min
9 remove duplicates II 41min
10 pair wise swap 37min
11 Merge two Sorted skipped