摘要: 每个线程会分配一个栈,线程中每个方法会对应线程中的一个栈帧。 操作数栈:操作数据(各种运算)的中转区域。 本地方法栈:new Thread() native start() 方法区:静态变量 常量 类元信息 分析: Math math1=new Math(); Math math2=new Math 阅读全文
posted @ 2019-07-07 20:28 hhhl 阅读(130) 评论(0) 推荐(0)
摘要: class Solution { public boolean wordBreak(String s, List wordDict) { //动态规划 s[i]以i结尾的子串是否满足题干条件 boolean [] dp=new boolean[s.length()]; Set set1=new HashSet(); //把w... 阅读全文
posted @ 2019-07-07 15:36 hhhl 阅读(335) 评论(0) 推荐(0)
摘要: 存储过程:为了完成特定功能的sql语句集。 优点: 1.增强了sql语句的灵活性,不仅仅局限于增删改查操作。 2.创建后,可以被反复调用,不必重写。 3.较快的执行速度。因为存储过程是预编译的,首次运行,优化器进行优化后,这个优化后的执行计划会被保存,下次再用不必重新检查优化。 4.较少网络流量。传 阅读全文
posted @ 2019-07-07 11:53 hhhl 阅读(239) 评论(0) 推荐(0)
摘要: class Solution { public int lengthOfLongestSubstring(String s) { //滑动窗口 Set set1=new HashSet(); int ans=0;int i=0;int j=0; int n=s.length(); while(i<n&... 阅读全文
posted @ 2019-07-06 15:43 hhhl 阅读(227) 评论(0) 推荐(0)
摘要: 1.mysql 版本 5.x: 5.0-5.1:早期产品的延续,升级维护 5.4 - 5.x : MySQL整合了三方公司的新存储引擎 (推荐5.5) 启动mysql应用: service mysql start 关闭: service mysql stop 重启: service mysql re 阅读全文
posted @ 2019-07-06 11:51 hhhl 阅读(597) 评论(0) 推荐(0)
摘要: /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ //递归 回溯 class Solution {... 阅读全文
posted @ 2019-07-05 18:53 hhhl 阅读(223) 评论(0) 推荐(0)
摘要: java容器有两类框架,一类是collection,一类是map collection接口 Map接口 object中的类 散列表 树对应的容器类 hashmap解决冲突的方法 1.再哈希 2.链表法 底层实现原理 数组+链表 哈希表 数组+链表+红黑树 技术本质 数据存储(数据结构+算法) 数组: 阅读全文
posted @ 2019-07-05 15:09 hhhl 阅读(398) 评论(0) 推荐(0)
摘要: 01背包 完全背包 多重背包 混合背包 二维费用背包 分组背包 背包问题求方案数 求背包问题方案 有依赖的背包问题 跳台阶 f(1) = 1, f(2) = 2, f(3) = 3, f(4) = 5, f(n) = f(n-1) + f(n-2) 矩形覆盖 f(n) = f(n-1) + f(n- 阅读全文
posted @ 2019-07-05 10:41 hhhl 阅读(174) 评论(0) 推荐(0)
摘要: 动态规划状态方程 二维数组 dp[i][j]=max(dp[i-1][j],dp[i-1][j-c[i]]+w[i]); i=1....n;j=0......v 一维数组 dp[j]=max(dp[j],dp[j-c[i]]+w[i]); i=1....n,j=v....0 阅读全文
posted @ 2019-07-04 23:51 hhhl 阅读(614) 评论(0) 推荐(0)
摘要: 1.将排序序列造成一个大顶堆(升序); 2.与末尾元素交换,此时末尾为最大值; 3.剩下的值执行重复执行上述操作。 从最后一个非叶子节点开始, 阅读全文
posted @ 2019-07-03 19:29 hhhl 阅读(137) 评论(0) 推荐(0)