20260331
- checked refunds & balance
- full-time job (hard)
- LeetCode
- 10.5 km run
- I think I should skip running tomorrow
#include <vector>
class Solution {
public:
std::vector<int> countBits(int n) {
std::vector<int> counts(n + 1, 0);
for (int i = 0; i < n + 1; ++i) {
int prefix_count = counts[i / 2];
int last_digit = i % 2;
counts[i] = prefix_count + last_digit;
}
return counts;
}
};
20260330
- 8k jog, push ups, arm curl, 6.5k jog
- full-time job
- LeetCode
- 338. Counting Bits
- 3885. Design Event Manager
- 322. Coin Change (code review)
- 310. Minimum Height Trees
- Essential Words for the TOEFL
- circumvent, elude, avert, astute, arduous, brazen
20260329
- 5 km walk, 8 km jog, push ups
- My legs feel really tight. Maybe I will skip jogging tomorrow.
- LeetCode
- 225. Implement Stack using Queues
- 139. Word Break
- code review
- Tabulation + Memoization
- 3885. Design Event Manager
20260328
- 8 km jog, 5 km walk, 2.5 km walk, push ups, arm curl
- LeetCode
- 283. Move Zeroes
- Dutch national flag problem
- 310. Minimum Height Trees
- Weekly Content 495
- I started considering a career change (n 回目)
20260327
- full-time job (light)
- 10 km jog, 6 km walk, push ups
- LeetCode
- 62. Unique Paths (code review)
- 310. Minimum Height Trees
20260326
- full-time job
- LeetCode
- 347. Top K Frequent Elements (code review)
- 105. Construct Binary Tree from Preorder and Inorder Traversal (code
review)
- 8 km jog, push ups, 4 km walk
20260325
I haven’t felt any motivation since my wife went on a trip to Japan
(causal relationship unconfirmed).
A smart watch (Coros) should be arriving tomorrow. Looking forward to
using it daily.
- full-time job
- push ups, 60 minutes walk
20260324
- full-time job
- LeetCode
- 141. Linked List Cycle (code review)
- 438. Find All Anagrams in a String
- 60 minutes walk, push ups, arm curl
20260323
I ate too much…
- full-time job
- LeetCode
- 703. Kth Largest Element in a Stream (code review)
- 438. Find All Anagrams in a String
- Python’s
ord() returns Unicode code point
- 310. Minimum Height Trees
- push ups, arm curl, 40 minutes jog
- ordered COROS
20260322
- LeetCode
- 39. Combination Sum (code review)
- 33. Search in Rotated Sorted Array (code review)
- 79. Word Search
- replied to review comments
- 11. Container with Most Water
- 387. First Unique Character in a String (code review)
- 17. Letter Combinations of a Phone Number
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 438. Find All Anagrams in a String
- 40 minutes jog
20260321
- replied to 246
- LeetCode
- 78. Subsets (code review)
- 79. Word Search
- Weekly Contest 494
- I didn’t do well, but nice try!
- 141. Linked List Cycle (code review)
- some work for my full-time job
- push ups, 30 minutes jog
20260320
I ate too much today… help!
- full-time job
- spent some time with my wife
- LeetCode
- 17. Letter Combinations of a Phone Number (replies to review
comments)
- 46. Permutations (code review)
- 139. Word Break (code review)
- https://api.dicebear.com/7.x/identicon/svg?seed=huyfififi
$ rsvg-convert -w 512 -h 512 huy_dicebear.svg -o --background-color=white output.png
- Identicon
- “An Identicon is a visual representation of a hash
value…”
- 45 minutes jog
20260319
- full-time job
- LeetCode
- 17. Letter Combinations of a Phone Number
- drawing
20260318
- full-time job
- LeetCode
- Container With Most Water
- 98. Validate Binary Search Tree (code review)
- push ups, 35 mimutes run
- drawing
20260317
- full-time job
- 20 minutes walk, push ups, 40 minutes jog
- LeetCode
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 703. Kth Largest Element in a Stream (code review)
- 103. Binary Tree Zigzag Level Order Traversal (code review)
- 11. Container With Most Water
20260316
- full-time job
- reached out to Izawa-san
- LeetCode
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- arm curl, push ups, 30 minutes run
20260315
- LeetCode
- 62. Unique Paths (code review)
- 8. String to Integer (code review)
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- Essential Words for the TOEFL
- The Technological Republic
- drawing
- renewed TLS for my Mastodon instance
20260314
- The Technological Republic
- treatise, imperative, entail, reliant, whim, insurgent, improvise,
relegate, delegate, innocuous, vagary
- Essential Words for the TOEFL
- adverse, haphazard, circumvent, benign, astute, instigate, baffle,
brash, conceal, engross, account for, dormant, drab, eclectic, mortify,
overbearing, burgeon, elude, oblivious, arduous, arid, avert, defy,
feign, indiscriminate, perilous, conscientious, encompass, infancy,
abysmal, discreetly, endemic, inordinate, inundate, nominal, brazen,
limber, look over, coherent, accentuate, alleviate, influx, predominant,
allude, overtly, upstanding, aptly, profuse, aggravating, debilitating,
trite, adage, caliber, precarious, sporadic, wanton
- LeetCode
- arm curl, push ups, 30 minutes jog
- drawing
20260313
- full-time job
- LeetCode
- 268. Missing Number
- 8. String to Integer (atoi)
- 703. Kth Largest Element in a Stream (code review)
- 82. Remove Duplicates from Sorted List II (code review)
- 1 hour jog
20260312
- full-time job (hard, AI makes iterations super fast. I’m somewhat
tired.)
- LeetCode
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 5. Longest Palindromic Substring
- 8. String to Integer (atoi)
- arm curl, push ups, 45 minutes jog
20260311
- full-time job (office)
- LeetCode
- 98. Validate Binary Search Tree (code review)
- 199. Binary Tree Right Side View
- 78. Subsets
- 54. Spiral Matrix
- 40 minutes run
20260310
- LeetCode
- 62. Unique Paths
- 199. Binary Tree Right Side View
- received feedback
- moving if condition out of for loop
- operations with side effects
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 141. Linked List Cycle (code review)
- full-time job
- arm curl, push ups, 30 minutes run
When you compile TypeScript, the output is plain JavaScript.
20260309
- full-time job (hard)
- 15 minutes walk, 30 minutes run, push ups
- LeetCode
- 78. Subsets
- backtracking is easy
- still need some time to digest
all_subsets += [subset + [num] for subset in all_subsets]
- 54. Spiral Matrix
- 199. Binary Tree Right Side View
- 5. Longest Palindromic Substring
- 62. Unique Paths
20260308
Negative feelings motivate me to do more LeetCode.
- LeetCode
- 66. Plus One (code review)
- 8. String to Integer (atoi)
- 416. Partition Equal Subset Sum
- 139. Word Break
- 54. Spiral Matrix
- 78. Subsets
- 199. Binary Tree Right Side View
- 5. Longest Palindromic Substring
- 25 minutes run
20260307
- LeetCode
- 416. Partition Equal Subset Sum
- 207. Course Schedule
- 9. String to Integer (atoi)
- 66. Plus One (code review)
- Even for this type of simple questions, I still face bugs sometimes
:sob:
- push ups
20260306
- checked review comments on my PR
- full-time job
- 20 minutes walk, 45 minutes jog
- LeetCode
- 416. Partition Equal Subset Sum
- checked review comments
- For small types, passing by value may be faster than passing by
reference, as the latter might involve multiple hops of referencing
- early return check (prune operations)
- 139. Word Break (DP, Trie)
- 133. Clone Graph
- drawing
20260305
- full-time job (hard)
- replied to Oda-san
- LeetCode
- 416. Partition Equal Subset Sum
- 139. Word Break
- DP, Trie, pay attention to invariants
- push ups, arm curl, 35 minutes jog
#include <cstdint>
#include <string>
#include <vector>
class Solution {
public:
bool wordBreak(const std::string& s, const std::vector<std::string>& wordDict) {
std::vector<uint8_t> possible(s.size() + 1);
possible[0] = 1;
for (size_t i = 0; i < s.size(); ++i) {
for (const auto& word : wordDict) {
if (i + word.size() > s.size()) { continue; }
possible[i + word.size()] |= possible[i] && !s.compare(i, word.size(), word);
}
}
return possible[s.size()];
}
};
20260304
- full-time job
- LeetCode
- 33. Search in Rotated Sorted Array (code review)
- replied to Oda-san
20260303
- took a long nap to recover
- full-time job (hard)
- LeetCode
- 139. Word Break
- 416. Partition Equal Subset Sum
- chest press, 30 minutes jog
- drawing
20260302
- so many misc work cancelling trips :sob:
- full-time job (very hard)
- LeetCode
- 695. Max Area of Island (code review)
- 139. Word Break
- chest press, 40 minutes jog
20260301
- misc work for my full-time position
- communications regarding my India trip
- tried TurboTax
- It seems our case is not covered
- printed out documents
- LeetCode
- 50 minutes jog, push ups
TODO:
- close Wells Fargo brokerage account
index 202602 202604