This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. https://claude.site/artifacts/cd4083fe-8e3d-4ac1-9cfa-44a0825fa7a4 | |
| 2. https://claude.site/artifacts/7476bd34-d035-4bea-82e5-9d99934dd31a | |
| 3. https://claude.site/artifacts/fbc8e46d-4e2f-4e66-829b-e01c12bebc87 | |
| 4. https://claude.site/artifacts/487436dc-70f5-495e-9525-68708a65886b | |
| 5. https://claude.site/artifacts/19f33855-c94b-4427-a6a4-f880d96794e5 | |
| 6. https://claude.site/artifacts/8dc664b0-68ff-4024-92e7-a3095063f436 | |
| 7. https://claude.site/artifacts/416d2cf7-5490-4f7e-bea7-33ca878678dd | |
| 8. https://claude.site/artifacts/17c84c80-29da-42ef-b3e2-447b58440d66 - Gojek flow allocations | |
| 9. https://claude.site/artifacts/64b30215-c785-4f2f-8f61-e6fc4a3fe2d3 - LLD checklist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Problem Statement | |
| 1 You have a stream of events where each event represents a page visit or any other kind of activity. Each event has a timestamp associated with it. You need to design a system that can efficiently track and report the top K most visited pages (or most frequent elements) over different time windows: the last 1 hour, last 1 day, and last 1 week. | |
| ```python | |
| import heapq | |
| from collections import deque, defaultdict | |
| from datetime import datetime, timedelta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. https://leetcode.com/problems/word-ladder/description/ | |
|  | |
| ```python | |
| import heapq | |
| import string | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 29 https://leetcode.com/problems/letter-combinations-of-a-phone-number/description/ | |
|  | |
| ```python | |
| class Solution: | |
| def __init__(self): | |
| self.mp = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. https://leetcode.com/problems/maximum-profit-from-trading-stocks/description/ | |
|  | |
| ```from typing import List | |
| class Solution: | |
| def maxProfitHelper(self, i: int, budget: int, present: List[int], future: List[int], memo) -> int: | |
| # Base case: If we've gone through all stocks or the budget is 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1 https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/ | |
|  | |
| ``` | |
| class Solution: | |
| def maxProfit(self, prices: List[int]) -> int: | |
| minPrice = float('inf') # minimum price seen so far | |
| maxProfit = 0 # maximum profit that can be achieved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|  | |
|  | |
|  | |
|  |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1 https://leetcode.com/problems/minimum-window-substring/description/ | |
|  | |
| ```python | |
| class Solution: | |
| def minWindow(self, s, t): | |
| # Importing defaultdict for more efficient counting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|  |
NewerOlder