摘要:
同步器是用来构建锁和其他同步组件的基础框架,它的实现主要依赖一个int成员变量来表示同步状态以及通过一个FIFO队列构成等待队列 阅读全文
posted @ 2019-04-15 19:50
yjxyy
阅读(181)
评论(0)
推荐(0)
摘要:
对象的内存分配,往大方向讲,就是在**堆上进行分配**,对象主要分配在**新生代的Eden区上**,如果启用了**本地线程分配缓冲**,将按线程优先在TLAB上进行分配,少数情况下也会直接分配在老年代。 阅读全文
posted @ 2019-04-15 19:39
yjxyy
阅读(157)
评论(0)
推荐(0)
摘要:
输入两个单调递增的链表,输出两个链表合成后的链表,当然我们需要合成后的链表满足单调不减规则。 阅读全文
posted @ 2019-04-15 19:26
yjxyy
阅读(100)
评论(0)
推荐(0)
摘要:
输入一个链表,反转链表后,输出新链表的表头。 阅读全文
posted @ 2019-04-15 19:24
yjxyy
阅读(127)
评论(0)
推荐(0)
摘要:
输入一个链表,输出该链表中倒数第k个结点。 阅读全文
posted @ 2019-04-15 19:08
yjxyy
阅读(122)
评论(0)
推荐(0)
摘要:
Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a tree consists of a node in s and all of this node's descendants. The tree s could also be considered as a subtree of itself. 阅读全文
posted @ 2019-04-15 19:04
yjxyy
阅读(205)
评论(0)
推荐(0)
摘要:
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the **longest** path between any two nodes in a tree. This path may or may not pass through the root. 阅读全文
posted @ 2019-04-15 19:01
yjxyy
阅读(222)
评论(0)
推荐(0)
摘要:
Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST. 阅读全文
posted @ 2019-04-15 18:59
yjxyy
阅读(169)
评论(0)
推荐(0)

浙公网安备 33010602011771号