Season 1, Episode 9: Tweener - Seth: You have got to help me. 你一定要帮我 -Burrows:You've got to help me. 你一定要帮我 -Pope: You're talking to the wrong man. This is a matter for the police. matter: 有关系 police: 警察 你找错人了,这是警察的事 -Burrows: This is my son we're ta…
[抄题]: Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; otherwise, it will return false. Each letter i…
书上关于GCTimeRatio的讲解有点难以理解,查看Oracle的文档后重新理解了下 -XX:GCTimeRatio 运行时间 / GC时间 当GCTimeRatio为19时,运行时间是GC时间的19倍,也就是GC时间不能超过 1 / (1 + 19) = 0.05 附上Oracle的文档原文 -XX:GCTimeRatio=nnn A hint to the virtual machine that it's desirable that not more than 1 / (1 + nnn…
题目链接:Recover Binary Search Tree | LeetCode OJ Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note: A solution using O(n) space is pretty straight forward. Could you devise a constan…
题目链接:Symmetric Tree | LeetCode OJ Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \ 3 4 4 3 But the following is not: 1 / \ 2 2 \ \ 3 3 Note: B…
题目链接:Valid Sudoku | LeetCode OJ Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled with the character '.'. A partially filled sudoku which is valid. Note:…
题目链接:Populating Next Right Pointers in Each Node II | LeetCode OJ Follow up for problem "Populating Next Right Pointers in Each Node". What if the given tree could be any binary tree? Would your previous solution still work? Note: You may only u…