08 2021 档案
摘要:public class SortedPrintMore extends Thread{ //由于是不同的Thread n最好是共享 //无锁化 int i; static int n; static Lock lock = new ReentrantLock(); static Condition
阅读全文
摘要:package offer; import java.util.concurrent.locks.ReentrantLock; /** * @DATE: 2021-08-31 * @TIME: 10:11 * @FUNCTION: 按序打印abc 因为是abc 所以需要引入属性 v2 无锁 */ p
阅读全文
摘要:public class SortedPrint implements Runnable{ int n; @Override public synchronized void run(){ //有个唤醒机制 while(true){ if(n>100) return; System.out.prin
阅读全文
摘要:class Solution { public void solveSudoku(char[][] board) { //最骚的一点:给递归函数一个返回值 直接调用 太帅了 bp(board); } private boolean bp(char[][] board){ for(int i =0;i
阅读全文
摘要:class Solution { List<List<String>> res; //检查 列+主对角+负对角 boolean[] cols; boolean[] poss; boolean[] negs; char[][] t; int m ; public List<List<String>>
阅读全文

浙公网安备 33010602011771号