Joined May 2022
295 Photos and videos
Pinned Tweet
โœจ๐Ÿ’ช๐Ÿป
3
13
2,864
๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ”น LeetCode Daily Challenge ๐Ÿ“˜ LC No.: 3634 ๐Ÿ’ก Approach: Sort & Slide (Sliding Window Two Pointers) ๐Ÿ”ฅ Day 788 Streak ๐Ÿ’ช โค๏ธ Like | ๐Ÿ” Follow @Kartscode #LeetCode #ProblemSolving #BuildInPublic #DSA #Java #CodingJourney #LeetCodeDaily
1
2
17
โฑ๏ธ Complexity โŒš T.C: O(n log n) (sorting) O(n) window scan ๐Ÿซ™ S.C: O(1) (no extra space)
1
8
๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ”น LeetCode Daily Challenge ๐Ÿ“˜ LC No.: 3013 ๐Ÿ’ก Approach: Dual Set Sliding Window ๐Ÿ”ฅ Day 784 Streak ๐Ÿ’ช โค๏ธ Like | ๐Ÿ” Follow @Kartscode #LeetCode #ProblemSolving #BuildInPublic #DSA #Java #CodingJourney #LeetCodeDaily
1
5
29
โฑ๏ธ Time & Space Complexity โฑ๏ธ T.C : O(n log n) โ†’ Sliding window TreeSet insert/remove & rebalancing ๐Ÿซ™ S.C : O(n) โ†’ Two TreeSets to manage window elements
2
12
๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ”น LeetCode Daily Challenge ๐Ÿ“˜ LC No.: 2976 ๐Ÿ’ก Approach: Floydโ€“Warshall on Characters (All-Pairs Shortest Path) ๐Ÿ”ฅ Day 780 Streak ๐Ÿ’ช โค๏ธ Like | ๐Ÿ” Follow @Kartscode #LeetCode #ProblemSolving #BuildInPublic #DSA #Java #CodingJourney #LeetCodeDaily
1
4
44
โฑ๏ธ Time & Space Complexity โŒšT.C : O(26ยณ n) โ†’ effectively O(n) (since 26 is constant) ๐Ÿซ™S.C : O(26ยฒ) โ†’ constant space
2
10
๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ”น LeetCode Daily Challenge ๐Ÿ“˜ LC NO.: 1200 ๐Ÿ’ก Approach: Sort & Scan ๐Ÿ”ฅ Day 777 Streak ๐Ÿ’ช โค๏ธ Like | ๐Ÿ” Follow @Kartscode #LeetCode #ProblemSolving #BuildInPublic #DSA #Java #CodingJourney #LeetCodeDaily
3
7
116
โฑ๏ธ Time & Space Complexity โŒš T.C: O(n log n) -> sorting dominates ๐Ÿซ™ S.C: O(1) -> extra space (excluding output list)
1
15
๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ”นLeetCode Daily Challenge ๐Ÿ“˜ LC NO.: 1984 ๐Ÿ’ก Approach: Sort & Shrink Window ๐Ÿ”ฅ Day 776 Streak ๐Ÿ’ช โค๏ธ Like | ๐Ÿ” Follow @Kartscode #LeetCode #ProblemSolving #BuildInPublic #DSA #Java #CodingJourney #LeetCodeDaily
2
16
128
โฑ๏ธ Time & Space Complexity โŒš T.C : O(n log n) -> Sorting dominates the runtime ๐Ÿซ™ S.C: O(1) -> No extra space (in-place sorting)
1
12
๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ”น LeetCode Daily Challenge ๐Ÿ“˜ LC: 3314 โ€“ Construct the Minimum Bitwise Array I ๐Ÿ’ก Approach: Trailing-Ones Trick ๐Ÿง  ๐Ÿ”ฅ Day 771 Streak ๐Ÿ’ช โค๏ธ Like | ๐Ÿ” Follow @Kartscode #LeetCode #ProblemSolving #BuildInPublic #DSA #Java #CodingJourney #LeetCodeDaily
2
8
53
โฑ๏ธ Time & Space Complexity โœ… T.C : O(n) Each number is processed in constant time (bit shifts are bounded by 32 bits). โœ… S.C : O(1) (excluding output array)
5
22
๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ”น LeetCode Daily Challenge ๐Ÿ“˜ LC: 1292 โ€“ Maximum Side Length of a Square with Sum โ‰ค Threshold ๐Ÿ’ก Approach: Prefix Sum Square Growth ๐Ÿ”ฅ Day 770 Streak ๐Ÿ’ช โค๏ธ Like | ๐Ÿ” Follow @Kartscode #LeetCode #ProblemSolving #BuildInPublic #DSA #Java #CodingJourney #LeetCodeDaily
1
6
43
โฑ๏ธ Time & Space Complexity โŒš Time Complexity: O(m ร— n ร— min(m, n)) ๐Ÿซ™ Space Complexity: O(1) (in-place prefix sum)
2
12
๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ”น LeetCode Daily Challenge ๐Ÿ“˜ LC.: 3047 ๐Ÿ’ก Approach: Brute-Force Rectangle Intersection ๐Ÿ”ฅ Day 768 Streak ๐Ÿ’ช โค๏ธ Like | ๐Ÿ” Follow @Kartscode #LeetCode #ProblemSolving #BuildInPublic #DSA #Java #CodingJourney #LeetCodeDaily
1
5
37
โฑ๏ธ Time & Space Complexity โŒš T.C: O(nยฒ) โ€”> checking all rectangle pairs ๐Ÿซ™ S.C: O(1) โ€” > no extra data structures
2
15
๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ”น LeetCode Daily Challenge ๐Ÿ“˜ LC.: 2975 โ€“ Maximum Square Area by Removing Fences ๐Ÿ’ก Approach: Common Distance Matching ๐Ÿ”ฅ Day 767 Streak ๐Ÿ’ช โค๏ธ Like | ๐Ÿ” Follow @Kartscode #LeetCode #ProblemSolving #BuildInPublic #DSA
1
3
24
โฑ๏ธTime & Space Complexity โŒšT.C : O(Hยฒ Vยฒ) H = number of horizontal fences V = number of vertical fences We check all pairwise distances ๐Ÿซ™S.C : O(Hยฒ) For storing all horizontal distances in a HashSet
1
15
๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ”น LeetCode Daily Challenge ๐Ÿ“˜ LC.: 3453 โ€“ Separate Squares I ๐Ÿ’ก Approach: Area Balance Binary Search ๐Ÿ”ฅ Day 764 Streak ๐Ÿ’ช โค๏ธ Like | ๐Ÿ” Follow @Kartscode #LeetCode #ProblemSolving #BuildInPublic #DSA
1
4
41
โฑ๏ธ Time & Space Complexity โŒš Time Complexity: O(N * log H) ๐Ÿซ™ Space Complexity: O(1)
1
15