This weekend was insanely busy, and I paid the price for my procrastination and laziness. Everything piled up together, and Sunday had a ridiculous number of deadlines. At 10 a.m. I had a meeting with my advisor to discuss how to prepare the make-up exam for the undergraduate Computer Organization c
Read more »

Today let’s study two important data structures together: queue and stack. This article is based on LeetCode’s Explore tutorial, Introduction to Data Structure - Queue & Stack. Introduction The most commonly used collection is the array, and its most commonly used data-access operation is random ac
Read more »

Today was my first LeetCode weekly contest after work started again. I solved three problems and ranked 772 / 4174. Seeing my rank drop from 200+ to 700+ each time felt pretty disappointing. I think the reasons for the drop are: 1. Ranking around 200 was a case where both my state and luck were rela
Read more »

This article is based on LeetCode’s tutorial Introduction to Algorithms - Recursion I. Its purpose is to help me become more familiar with the important programming concept of “recursion”. If it can also help others, that would be even better. The structure of this article is exactly the same as Le
Read more »

This contest was the first one after the Spring Festival. 989. Add to Array-Form of Integer Idea: simulate the written addition process and add digit by digit. The official Solution has a very vivid name for it: Schoolbook Addition. Time complexity: O(max(N, M)), where N and M are the lengths of A
Read more »

Because I was staying at home for the holiday, I actually forgot what day of the week it was and only knew which day of the twelfth lunar month it was. Today I finally realized it was already Monday and that I had missed the weekly contest. On this Chinese New Year’s Eve, before watching the Spring
Read more »

Today I went home for vacation, with a train at 3:30 p.m. But I still squeezed out time from a busy schedule to join the regular weekly contest. The result was poor because I was not focused enough while going home. I only solved the warm-up problem. The second problem TLEed, and in the end it could
Read more »

This week, I joined the weekly contest together with my good friend “Female Voice Male”. Competing with a classmate still brings quite a bit of pressure. I have been practicing algorithm problems for half a year, while he is still a beginner. If I lost in the end, that would be embarrassing. Fortuna
Read more »

This contest went rather badly. My rank was roughly 1486 / 3845. The problems were: * The second problem was relatively simple. Since it was an Easy problem, I directly used brute force and got one TLE. Earlier, because of carelessness, I also wrote the wrong variable in the for loop condition onc
Read more »

The weekly LeetCode weekly contest has begun. This week I genuinely improved compared with before. First, I am more familiar with C++; previously I always used Python. The answering process was also smoother, and I almost solved three problems. 970. Powerful Integers The first problem was only wort
Read more »
0%