Content-Length: 784488 | pFad | http://github.com/LeetCode-in-Net/LeetCode-in-Net/commit/834a543b66bffb6968bfb7b40b23839ba3b00f1a

F7 Improved task 49 · LeetCode-in-Net/LeetCode-in-Net@834a543 · GitHub
Skip to content

Commit 834a543

Browse files
authored
Improved task 49
1 parent a2a7b7e commit 834a543

File tree

2 files changed

+84
-67
lines changed

2 files changed

+84
-67
lines changed

LeetCodeNet/G0001_0100/S0049_group_anagrams/Solution.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace LeetCodeNet.G0001_0100.S0049_group_anagrams {
22

33
// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #String #Hash_Table #Sorting
44
// #Data_Structure_II_Day_8_String #Programming_Skills_II_Day_11 #Udemy_Strings
5-
// #Big_O_Time_O(n*k_log_k)_Space_O(n)
5+
// #Big_O_Time_O(n*k_log_k)_Space_O(n) #2024_01_04_Time_145_ms_(96.20%)_Space_80.2_MB_(38.80%)
66

77
public class Solution {
88
public IList<IList<string>> GroupAnagrams(string[] strs) {

README.md

Lines changed: 83 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
1111
> ["For coding interview preparation, LeetCode is one of the best online resource providing a rich library of more than 300 real coding interview questions for you to practice from using one of the 7 supported languages - C, C++, Java, Python, C#, JavaScript, Ruby."](https://www.quora.com/How-effective-is-Leetcode-for-preparing-for-technical-interviews)
1212
1313
##
14-
* [Binary Search I](#binary-search-i)
1514
* [Binary Search II](#binary-search-ii)
1615
* [Dynamic Programming I](#dynamic-programming-i)
1716
* [Programming Skills I](#programming-skills-i)
@@ -25,71 +24,7 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
2524
* [Data Structure II](#data-structure-ii)
2625
* [Algorithm I](#algorithm-i)
2726
* [Algorithm II](#algorithm-ii)
28-
29-
### Binary Search I
30-
31-
#### Day 1
32-
33-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
34-
|-|-|-|-|-|-
35-
36-
#### Day 2
37-
38-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
39-
|-|-|-|-|-|-
40-
| 0035 |[Search Insert Position](LeetCodeNet/G0001_0100/S0035_search_insert_position/Solution.cs)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 106 | 6.17
41-
42-
#### Day 3
43-
44-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
45-
|-|-|-|-|-|-
46-
47-
#### Day 4
48-
49-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
50-
|-|-|-|-|-|-
51-
52-
#### Day 5
53-
54-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
55-
|-|-|-|-|-|-
56-
| 0034 |[Find First and Last Position of Element in Sorted Array](LeetCodeNet/G0001_0100/S0034_find_first_and_last_position_of_element_in_sorted_array/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 171 | 5.87
57-
58-
#### Day 6
59-
60-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
61-
|-|-|-|-|-|-
62-
63-
#### Day 7
64-
65-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
66-
|-|-|-|-|-|-
67-
68-
#### Day 8
69-
70-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
71-
|-|-|-|-|-|-
72-
73-
#### Day 9
74-
75-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
76-
|-|-|-|-|-|-
77-
78-
#### Day 10
79-
80-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
81-
|-|-|-|-|-|-
82-
83-
#### Day 11
84-
85-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
86-
|-|-|-|-|-|-
87-
| 0033 |[Search in Rotated Sorted Array](LeetCodeNet/G0001_0100/S0033_search_in_rotated_sorted_array/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 63 | 96.89
88-
89-
#### Day 12
90-
91-
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
92-
|-|-|-|-|-|-
27+
* [Binary Search I](#binary-search-i)
9328

9429
### Binary Search II
9530

@@ -214,12 +149,14 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
214149

215150
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
216151
|-|-|-|-|-|-
152+
| 0055 |[Jump Game](LeetCodeNet/G0001_0100/S0055_jump_game/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 189 | 38.02
217153
| 0045 |[Jump Game II](LeetCodeNet/G0001_0100/S0045_jump_game_ii/Solution.cs)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 144 | 15.35
218154

219155
#### Day 5
220156

221157
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
222158
|-|-|-|-|-|-
159+
| 0053 |[Maximum Subarray](LeetCodeNet/G0001_0100/S0053_maximum_subarray/Solution.cs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 276 | 20.05
223160

224161
#### Day 6
225162

@@ -401,6 +338,7 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
401338

402339
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
403340
|-|-|-|-|-|-
341+
| 0048 |[Rotate Image](LeetCodeNet/G0001_0100/S0048_rotate_image/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Big_O_Time_O(n^2)_Space_O(1) | 92 | 97.78
404342

405343
#### Day 8
406344

@@ -421,6 +359,7 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
421359

422360
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
423361
|-|-|-|-|-|-
362+
| 0049 |[Group Anagrams](LeetCodeNet/G0001_0100/S0049_group_anagrams/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 145 | 96.20
424363

425364
#### Day 12
426365

@@ -794,6 +733,7 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
794733
| 0003 |[Longest Substring Without Repeating Characters](LeetCodeNet/G0001_0100/S0003_longest_substring_without_repeating_characters/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n)_Space_O(1) | 50 | 98.40
795734
| 0020 |[Valid Parentheses](LeetCodeNet/G0001_0100/S0020_valid_parentheses/Solution.cs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String, Stack, Big_O_Time_O(n)_Space_O(n) | 53 | 96.68
796735
| 0005 |[Longest Palindromic Substring](LeetCodeNet/G0001_0100/S0005_longest_palindromic_substring/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 61 | 99.50
736+
| 0049 |[Group Anagrams](LeetCodeNet/G0001_0100/S0049_group_anagrams/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 145 | 96.20
797737

798738
#### Udemy Binary Search
799739

@@ -806,6 +746,7 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
806746
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
807747
|-|-|-|-|-|-
808748
| 0001 |[Two Sum](LeetCodeNet/G0001_0100/S0001_two_sum/Solution.cs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Big_O_Time_O(n)_Space_O(n) | 134 | 81.26
749+
| 0055 |[Jump Game](LeetCodeNet/G0001_0100/S0055_jump_game/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 189 | 38.02
809750
| 0041 |[First Missing Positive](LeetCodeNet/G0001_0100/S0041_first_missing_positive/Solution.cs)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Big_O_Time_O(n)_Space_O(n) | 192 | 13.98
810751

811752
#### Udemy Two Pointers
@@ -819,6 +760,7 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
819760

820761
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
821762
|-|-|-|-|-|-
763+
| 0053 |[Maximum Subarray](LeetCodeNet/G0001_0100/S0053_maximum_subarray/Solution.cs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 276 | 20.05
822764

823765
#### Udemy Sorting Algorithms
824766

@@ -829,6 +771,7 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
829771

830772
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
831773
|-|-|-|-|-|-
774+
| 0048 |[Rotate Image](LeetCodeNet/G0001_0100/S0048_rotate_image/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Big_O_Time_O(n^2)_Space_O(1) | 92 | 97.78
832775

833776
#### Udemy Linked List
834777

@@ -884,6 +827,7 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
884827

885828
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
886829
|-|-|-|-|-|-
830+
| 0053 |[Maximum Subarray](LeetCodeNet/G0001_0100/S0053_maximum_subarray/Solution.cs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 276 | 20.05
887831

888832
#### Day 2 Array
889833

@@ -970,6 +914,7 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
970914

971915
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
972916
|-|-|-|-|-|-
917+
| 0048 |[Rotate Image](LeetCodeNet/G0001_0100/S0048_rotate_image/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Big_O_Time_O(n^2)_Space_O(1) | 92 | 97.78
973918

974919
#### Day 4 Array
975920

@@ -995,6 +940,7 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
995940

996941
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
997942
|-|-|-|-|-|-
943+
| 0049 |[Group Anagrams](LeetCodeNet/G0001_0100/S0049_group_anagrams/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 145 | 96.20
998944

999945
#### Day 9 String
1000946

@@ -1210,6 +1156,7 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
12101156

12111157
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
12121158
|-|-|-|-|-|-
1159+
| 0055 |[Jump Game](LeetCodeNet/G0001_0100/S0055_jump_game/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 189 | 38.02
12131160

12141161
#### Day 13 Dynamic Programming
12151162

@@ -1258,10 +1205,80 @@ C#-based LeetCode algorithm problem solutions, regularly updated.
12581205
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
12591206
|-|-|-|-|-|-
12601207

1208+
### Binary Search I
1209+
1210+
#### Day 1
1211+
1212+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1213+
|-|-|-|-|-|-
1214+
1215+
#### Day 2
1216+
1217+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1218+
|-|-|-|-|-|-
1219+
| 0035 |[Search Insert Position](LeetCodeNet/G0001_0100/S0035_search_insert_position/Solution.cs)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 106 | 6.17
1220+
1221+
#### Day 3
1222+
1223+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1224+
|-|-|-|-|-|-
1225+
1226+
#### Day 4
1227+
1228+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1229+
|-|-|-|-|-|-
1230+
1231+
#### Day 5
1232+
1233+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1234+
|-|-|-|-|-|-
1235+
| 0034 |[Find First and Last Position of Element in Sorted Array](LeetCodeNet/G0001_0100/S0034_find_first_and_last_position_of_element_in_sorted_array/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 171 | 5.87
1236+
1237+
#### Day 6
1238+
1239+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1240+
|-|-|-|-|-|-
1241+
1242+
#### Day 7
1243+
1244+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1245+
|-|-|-|-|-|-
1246+
1247+
#### Day 8
1248+
1249+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1250+
|-|-|-|-|-|-
1251+
1252+
#### Day 9
1253+
1254+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1255+
|-|-|-|-|-|-
1256+
1257+
#### Day 10
1258+
1259+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1260+
|-|-|-|-|-|-
1261+
1262+
#### Day 11
1263+
1264+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1265+
|-|-|-|-|-|-
1266+
| 0033 |[Search in Rotated Sorted Array](LeetCodeNet/G0001_0100/S0033_search_in_rotated_sorted_array/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 63 | 96.89
1267+
1268+
#### Day 12
1269+
1270+
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1271+
|-|-|-|-|-|-
1272+
12611273
## Algorithms
12621274

12631275
| # | Title | Difficulty | Tag | Time, ms | Time, %
12641276
|------|----------------|-------------|-------------|----------|---------
1277+
| 0055 |[Jump Game](LeetCodeNet/G0001_0100/S0055_jump_game/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Algorithm_II_Day_12_Dynamic_Programming, Dynamic_Programming_I_Day_4, Udemy_Arrays, Big_O_Time_O(n)_Space_O(1) | 189 | 38.02
1278+
| 0053 |[Maximum Subarray](LeetCodeNet/G0001_0100/S0053_maximum_subarray/Solution.cs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Data_Structure_I_Day_1_Array, Dynamic_Programming_I_Day_5, Udemy_Famous_Algorithm, Big_O_Time_O(n)_Space_O(1) | 276 | 20.05
1279+
| 0051 |[N-Queens](LeetCodeNet/G0001_0100/S0051_n_queens/Solution.cs)| Hard | Top_100_Liked_Questions, Array, Backtracking, Big_O_Time_O(N!)_Space_O(N) | 106 | 96.34
1280+
| 0049 |[Group Anagrams](LeetCodeNet/G0001_0100/S0049_group_anagrams/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Data_Structure_II_Day_8_String, Programming_Skills_II_Day_11, Udemy_Strings, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 145 | 96.20
1281+
| 0048 |[Rotate Image](LeetCodeNet/G0001_0100/S0048_rotate_image/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Data_Structure_II_Day_3_Array, Programming_Skills_II_Day_7, Udemy_2D_Arrays/Matrix, Big_O_Time_O(n^2)_Space_O(1) | 92 | 97.78
12651282
| 0046 |[Permutations](LeetCodeNet/G0001_0100/S0046_permutations/Solution.cs)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Algorithm_I_Day_11_Recursion_Backtracking, Level_2_Day_20_Brute_Force/Backtracking, Udemy_Backtracking/Recursion, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 148 | 5.56
12661283
| 0045 |[Jump Game II](LeetCodeNet/G0001_0100/S0045_jump_game_ii/Solution.cs)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Greedy, Algorithm_II_Day_13_Dynamic_Programming, Dynamic_Programming_I_Day_4, Big_O_Time_O(n)_Space_O(1) | 144 | 15.35
12671284
| 0042 |[Trapping Rain Water](LeetCodeNet/G0001_0100/S0042_trapping_rain_water/Solution.cs)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Two_Pointers, Stack, Monotonic_Stack, Dynamic_Programming_I_Day_9, Udemy_Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 81 | 89.96

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/LeetCode-in-Net/LeetCode-in-Net/commit/834a543b66bffb6968bfb7b40b23839ba3b00f1a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy