☆☆☆☆思路:本题是二维的0-1背包问题,把总共的 0 和 1 的个数视为背包的容量 class Solution { public int findMaxForm(String[] strs, int m, int n) { /*int len = strs.length; // dp[i][j] ...
分类:
其他好文 时间:
2021-01-06 12:30:29
阅读次数:
0
转:https://www.cnblogs.com/hama1993/p/10400265.html 一、基本使用 我们继续来看之前写的例子: private static ThreadLocal tl = new ThreadLocal<>(); public static void main(S ...
分类:
其他好文 时间:
2021-01-06 12:29:40
阅读次数:
0
JAVA: class WordDictionary { private Node head; /** * Initialize your data structure here. */ public WordDictionary() { this.head = new Node(null); } ...
分类:
其他好文 时间:
2021-01-06 12:18:38
阅读次数:
0
JAVA 实现: class Trie { private Node head; /** * Initialize your data structure here. */ public Trie() { this.head = new Node(); } /** * Inserts a word ...
分类:
其他好文 时间:
2021-01-06 12:15:16
阅读次数:
0
一步一步推导出官方最优解法,详细图解 上面这篇文章讲的很详细了。 ####300. 最长递增子序列 class Solution { public: int lengthOfLIS(vector<int>& nums) { vector<int> minList; for(auto& i : num ...
分类:
其他好文 时间:
2021-01-06 12:12:27
阅读次数:
0
简介: 将原型bean注入到单例bean,会破坏原型bean的生命周期,使其的生命周期变成与单例bean相同。 好了,废话不多少,直接上栗子,边吃边说。 情况模拟: 1、单例bean @Component public class SingletonBean { @Autowired private ...
分类:
其他好文 时间:
2021-01-06 12:06:30
阅读次数:
0
ReaderWriterLockSlim-多线程读单线程写 注意事项 (1)线程A如果通过EnterReadLock获取到读锁(ReadLock)后,不能在持有读锁的情况下再申请获取写锁(WriteLock) 如果违反了这个规定就报如下错:Write lock may not be acquired ...
Markdown学习 标题 三级标题 字体 hello world hello world hello world hello world 引用 引用一段话 分割线 图片 超链接 点击跳转到百度 列表 a b c 1 2 3 表格 姓名性别生日 张三 男 20001.1 代码 public ...
分类:
其他好文 时间:
2021-01-05 11:38:49
阅读次数:
0
题目 1 class Solution { 2 public: 3 4 bool isSymmetric(TreeNode* root) { 5 return check(root,root); 6 } 7 bool check(TreeNode* p,TreeNode* q) { 8 if(!p ...
分类:
其他好文 时间:
2021-01-05 11:37:37
阅读次数:
0
Log::info('测试'); Log是一个门面 本质类是Logmanager 门面就是门面 就是代理 本质上 没有任何内在的东西 public function info($message, array $context = []) { $this->driver()->info($messag ...
分类:
其他好文 时间:
2021-01-05 11:35:40
阅读次数:
0