Tag: Hash Table
2364. Count Number of Bad Pairs
Permutation: in order. n!/(n – m)! Combination: order not considered. n!/((n – m)! * m!) Key point of this problem is to transfer i…
916. Word Subsets
Instead of dictionary, we can use an array of 26. Every medium has it’s own easy and hard…
3404. Count Special Subsequences
Point: Turn multiplication to fraction Hard to realize “for r in range(4, n – 2): q = r – 2” part.
2168. Unique Substrings With Equal Digit Frequency
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…
3408. Design Task Manager
Point is: we don’t have to remove items immediately from heap after rmv / edit operation. Do it when we are going to execTop.
 
						 
						 
						 
						 
						 
						