摘要:
1.定义 ThreadLocal是线程变量,就是说每一个线程都有对应的该变量副本,线程修改该变量时,线程与线程之间的变量是相互隔离的,互相并看不见。这个结构附带在线程上,一个线程可以根据ThreadLocal对象查询到绑定到该线程上的值。 2.主要方法 ThreadLocal的主要方法都是基于Thr 阅读全文
摘要:
Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the or 阅读全文
摘要:
Write an efficient algorithm that searches for a value in an m x n matrix.This matrix has the following properties: Integers in each row are sorted fr 阅读全文
摘要:
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Input: [ [1,1,1], [1,0,1], [1,1,1] ] Output: 阅读全文