Skip to content
  •  Soul Society
  •  0858#969#6261
  •  N/A
Dev Path for CC
  • About
  • Contact

Tag: Hash Table

2364. Count Number of Bad Pairs
LeetCode

2364. Count Number of Bad Pairs

February 9, 2025 Counting, Hash Table, Math, Medium

Permutation: in order. n!/(n – m)! Combination: order not considered. n!/((n – m)! * m!) Key point of this problem is to transfer i…

Leave a Comment on 2364. Count Number of Bad Pairs
1726. Tuple with Same Product
LeetCode

1726. Tuple with Same Product

February 7, 2025 Counting, Hash Table, Math, Medium

Leave a Comment on 1726. Tuple with Same Product
916. Word Subsets
LeetCode

916. Word Subsets

January 10, 2025 Hash Table, Medium, String

Instead of dictionary, we can use an array of 26. Every medium has it’s own easy and hard…

Leave a Comment on 916. Word Subsets
3404. Count Special Subsequences
LeetCode

3404. Count Special Subsequences

January 9, 2025 Hash Table, Math, Medium

Point: Turn multiplication to fraction Hard to realize “for r in range(4, n – 2): q = r – 2” part.

Leave a Comment on 3404. Count Special Subsequences
2168. Unique Substrings With Equal Digit Frequency
LeetCode

2168. Unique Substrings With Equal Digit Frequency

January 8, 2025 Hash Table, Medium, Rolling Hash

Actually, brute force can work due to constrains. However, if we count the frequency every time, the time complexity will be O(n**3), which may…

Leave a Comment on 2168. Unique Substrings With Equal Digit Frequency
3408. Design Task Manager
LeetCode

3408. Design Task Manager

January 7, 2025 Hash Table, Heap, Medium, OOD

Point is: we don’t have to remove items immediately from heap after rmv / edit operation. Do it when we are going to execTop.

Leave a Comment on 3408. Design Task Manager
3412. Find Mirror Score of a String
LeetCode

3412. Find Mirror Score of a String

January 7, 2025January 7, 2025 Hash Table, Medium

Leave a Comment on 3412. Find Mirror Score of a String

Recent Posts

  • 🚨 Welcome to the Era of o4: Powerful, Autonomous… and Hallucinating?
  • 3472. Longest Palindromic Subsequence After at Most K Operations
  • 3473. Sum of K Subarrays With Length at Least M
  • 3474. Lexicographically Smallest Generated String
  • 1524. Number of Sub-arrays With Odd Sum

Recent Comments

  1. lcsqr on 1462. Course Schedule IV
  2. lcsqr on 1462. Course Schedule IV
  3. lcsqr on 3409. Longest Subsequence With Decreasing Adjacent Difference
  4. lcsqr on 3413. Maximum Coins From K Consecutive Bags
  5. lcsqr on 3411. Maximum Subarray With Equal Products

Archives

  • April 2025
  • March 2025
  • February 2025
  • January 2025

Categories

  • Artificial Intelligence
  • LeetCode
  • Others
Designed by Nasio Themes || Powered by WordPress