Building software that solves real problems. Software Engineer | Frontend | Backend Shipping ideas to the internet.

Joined March 2026
Magazine = inventory. Letter = demand. Every required character simply decrements its available count. #algorithms #hashtables Watch: youtube.com/watch?v=bLHsVKCY…
1
M='aabc' becomes inventory: a→2, b→1, c→1. We no longer care where the characters are — only how many remain. #hashtables #python Watch: youtube.com/watch?v=bLHsVKCY…
1
8
Brute force asks: where is another unused character? Optimized asks: how many do I have left? That shift changes the whole solution. #hashtables #algorithms Watch: youtube.com/watch?v=bLHsVKCY…
5
Bad inventory flow: search stock records again for every unit. Better flow: item → available count → decrement. Same optimization idea. #softwareengineering Watch: youtube.com/watch?v=nK0kLzU4…
3
We track used positions, but what we really need is available quantity by character. That is the clue toward hashing. #hashtables #optimization Watch: youtube.com/watch?v=nK0kLzU4…
2
Worst case, used stores every magazine index. That gives O(M) auxiliary space. #python #bigO Watch: youtube.com/watch?v=nK0kLzU4…
15
If L ≈ M ≈ n, then O(L × M) becomes O(n²). Repeated scans create the quadratic growth. #algorithms Watch: youtube.com/watch?v=nK0kLzU4…
8
Why O(L × M)? Every required character in L may trigger a full scan through M. #algorithms #bigO Watch: youtube.com/watch?v=nK0kLzU4…
24
The code is correct, but every requirement can trigger another scan. Correctness and efficiency are two different questions. #algorithms Watch: youtube.com/watch?v=NC2-2qC-…
5
Second 'a': index 0 matches but is already used, so the search continues to index 1. #python #algorithms Watch: youtube.com/watch?v=NC2-2qC-…
4
Next requirement, inner loop starts again. The debugger makes the repeated magazine scan obvious. #algorithms #optimization Watch: youtube.com/watch?v=NC2-2qC-…
3
First 'a': match M[0] → add 0 to used → found=True → break. One requirement consumes one copy. #python #debugging Watch: youtube.com/watch?v=NC2-2qC-…
7
Debugger focus: char_l, j, used, found. Those 4 values show the entire brute-force search at runtime. #python #debugging Watch: youtube.com/watch?v=NC2-2qC-…
1
4
The code is correct, but every requirement can trigger another scan. Correctness and efficiency are two different questions. #algorithms Watch: youtube.com/watch?v=ZHrTOxom…
8
Second 'a': index 0 matches but is already used, so the search continues to index 1. #python #algorithms Watch: youtube.com/watch?v=ZHrTOxom…
2
9
Next requirement, inner loop starts again. The debugger makes the repeated magazine scan obvious. #algorithms #optimization Watch: youtube.com/watch?v=ZHrTOxom…
2
Debugger focus: char_l, j, used, found. Those 4 values show the entire brute-force search at runtime. #python #debugging Watch: youtube.com/watch?v=ZHrTOxom…
1
12
First 'a': match M[0] → add 0 to used → found=True → break. One requirement consumes one copy. #python #debugging Watch: youtube.com/watch?v=ZHrTOxom…
1
8
No available copy after the scan? Return False immediately. If a mandatory resource can't be fulfilled, the whole request fails. #algorithms #softwareengineering
6
Inner loop: scan → unused match → reserve index → break. One requirement consumes exactly one magazine character. #python #algorithms
1
15