摘要:
Stack solution: class Solution { public int scoreOfParentheses(String s) { Stack<Integer> st = new Stack<>(); int score = 0; for(int i = 0; i < s.leng 阅读全文
摘要:
My first solution, time complexityO(m*n), where m is the cell number of mat1, and n is the cell number of mat2: class Solution { public int[][] multip 阅读全文
摘要:
My first binary search solution: class Solution { public int findKthPositive(int[] arr, int k) { int l=0, r = arr.length-1; while(l+1<r){ int mid = (l 阅读全文