摘要:
Stack solution: class Solution { public int scoreOfParentheses(String s) { Stack<Integer> st = new Stack<>(); int score = 0; for(int i = 0; i < s.leng 阅读全文
posted @ 2022-04-19 10:19
阳光明媚的菲越
阅读(17)
评论(0)
推荐(0)
摘要:
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 阅读全文
posted @ 2022-04-19 08:15
阳光明媚的菲越
阅读(17)
评论(0)
推荐(0)
摘要:
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 阅读全文
posted @ 2022-04-19 06:53
阳光明媚的菲越
阅读(16)
评论(0)
推荐(0)