写给即将出生的你

我的宝贝,今天是五月十二号。 早上五点多,妈妈的羊水破了。你好准时,不耽误爸爸一天的假期啊。现在爸爸和外婆在产房陪着妈妈,我们紧张、兴奋,期待

这是写给闺女的第一封信

这是写给闺女的第一份信。 妈妈是去年 8 月份怀孕的。那时的爸爸心情还是比较复杂的,既喜悦,也有一些压力。爸爸觉得自己还没有长大,似乎还是个大男孩

Docker Basics

What is Docker? Docker, like git in version control, is the most popular implementation in containerization. Why do we need containers? Because we want consistency in building, running, and shipping applications. In an app, we usually have the code we wrote, third-party dependencies, configuration info, and things about OS(filesystem, networking, etc). With the help of containerization, no matter on which machine, our applications will run in the same environment. Virtual

Implementing Stack and Queue in JavaScript

In JavaScript, both stack and queue data structures are commonly implemented using arrays. Here’s a brief conclusion on how to implement these structures, excluding priority queues which are slightly more complex and typically use third-party libraries. Stack Stacks follow the LIFO principle. Using JavaScript arrays, we can mimic this behavior easily. create a stack 1 const stack = []; push to the top of stack

Leetcode 198.House Robber

Here are two approaches to solving the classic “House Robber” problem: Recursion + Backtracking, and Iteration. Both methods apply dynamic programming effectively, albeit in different ways. Solution One (Recursion + Backtracking) This solution I found online (author: labuladong) uses recursion and backtracking. I am not sure if this counts as dynamic programming. Basic Idea Standing in front of the i-th house, the robber has two options: rob it and jump