摘要:
1332. 删除回文子序列 Solution 思路: 回文子序列 所以最多两次,如果一开始就是回文串的话 就是一次。 class Solution { public int removePalindromeSub(String s) { int i =0, j = s.length() - 1; w 阅读全文
摘要:
传送门 Solution 思路1: 暴力 class Solution { public int[] nextGreaterElement(int[] nums1, int[] nums2) { int[] ans = new int[nums1.length]; int cur = 0; for 阅读全文
摘要:
传送门 Solution 思路1: 暴力搜索 class Solution { public boolean searchMatrix(int[][] matrix, int target) { for (int[] row: matrix) { for (int x : row) { if (x 阅读全文