摘要:
public class Solution { private String[] lessThanTwenty = { "", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven 阅读全文
摘要:
To solve this problem, we need two steps: 1. Convert "order" string to a Hashmap, the key is the characor in the "order" string, value is its index. 2 阅读全文
摘要:
这道题是典型的括号题,一般来说,括号题用stack做,但是这道题因为太简单了,连stack都不用, 就用int就好了,时间复杂度O(n)。 public int minAddToMakeValid(String s) { int count = 0; int res = 0; for(int i=0 阅读全文