LeetCode 55. Jump Game

Question Link Description: You are given an integer array nums. You are initially positioned at the array’s first index, and each element in the array represents your maximum jump length at that position. Return true if you can reach the last index, or false otherwise. Examples Example 1 1 2 3 Input: nums = [2,3,1,1,4] Output: true Explanation: Jump 1 step from index 0 to 1, then 3 steps to...

May 23, 2023 · 1 min

Clickable Minesweeper Game — 可以點的踩地雷

I discovered that using Ansi-escape can do cool things on the terminal, so I wrote an easy minesweeping game that outputs colorful numbers and stuff. I was pretty satisfied with the result. I no longer need to torture my eyes, staring at the black-and-white terminal output for debugging. Colorful Minesweeper Here are the types of cells: ‘#’ cell, anything can be under it. Mind your step! Number cells, just like...

February 13, 2023 · 2 min