摘要:
很简单 可以用hash表进行模拟,也可以用数组来做,因为题目已经给了数的范围 class Solution { public int mostFrequentEven(int[] nums) { int[] count = new int[100001]; int res = -1; int res 阅读全文
摘要:
本题虽然是困难 但是难度不大 写的时候也是有经验 class Solution { public void solveSudoku(char[][] board) { backtrack(board,0,0); } public boolean backtrack(char[][] board, i 阅读全文
摘要:
public boolean findSubarrays(int[] nums) { Map<Integer,Integer> allSets = new HashMap<>(); for(int i = 0; i < nums.length - 1; i++){ int res= nums[i] 阅读全文
摘要:
class Solution { public List checkArithmeticSubarrays(int[] nums, int[] l, int[] r) { int n = l.length; List ans = new ArrayList(); for (int i = 0; i 阅读全文