Leetcode 1653: Minimum Deletions to Make String Balanced

Leetcode •

Recently I have been under a lot of stress at work, so I do LeetCode to relax. Unlike before, when I tried to learn new techniques, algorithms or data structures, this time I try to challenge myself to beat 100%. I have been successful several times this year. Let me share with you my thinking when trying to reach P100 for #1653: Minimum Deletions to Make String Balanced. ...

Use ADB to backup and restore local data for testing 2

Android •

Three years ago, I wrote a note about how to use adb to backup the test data. At that time, or at the time when I created the scripts (before writing the note), we were still able to save files in the common spaces such as SDCard by using ...

Leetcode 148: Sort list - with Radix sort

Leetcode •

The question is simple: Given the head of a linked list, return the list after sorting it in ascending order ...

LeetCode 321: Create maximum number — a dynamic programming approach

Leetcode •

You are given two integer arrays nums1 and nums2 of lengths m and n respectively. nums1 and nums2 represent the digits of two numbers. You are also given an integer k ...

A very simple argument parser

Scripting •

I’m a guy who usually writes a lot of script files to automate my daily routine. To extend the flexibility of the script, a good piece of advice is to make the script accepts parameters passing from command ...