摘要:
Given the root of a binary search tree and a target value, return the value in the BST that is closest to the target. Example 1: Input: root = [4,2,5, 阅读全文
摘要:
[抄题]: You need to construct a binary tree from a string consisting of parenthesis and integers. The whole input represents a binary tree. It contains 阅读全文
摘要:
Given a binary tree, find the largest subtree which is a Binary Search Tree (BST), where largest means subtree with largest number of nodes in it. Not 阅读全文
摘要:
Given an integer n, return all the structurally unique BST's (binary search trees), which has exactly n nodes of unique values from 1 to n. Return the 阅读全文
摘要:
参考:https://engineering.99x.io/full-stack-serverless-web-apps-with-aws-189d87da024a DynamoDB完全托管于aws,登陆aws控制台后就能用,不需要额外配置服务器。 阅读全文
摘要:
两场面试都挂了好吗!绝对是减分项 阅读全文
摘要:
参考: public void wallsAndGates(int[][] rooms) { for (int i = 0; i < rooms.length; i++) for (int j = 0; j < rooms[0].length; j++) if (rooms[i][j] == 0) 阅读全文
摘要:
只有children(),所以要自己去定义。真是多年来的误区 参考:https://docs.oracle.com/javase/7/docs/api/javax/swing/tree/TreeNode.html 阅读全文
摘要:
参考:https://www.geeksforgeeks.org/binary-tree-set-1-introduction/ /* Class containing left and right child of current node and key value*/ class Node { 阅读全文
摘要:
很多台DB server, 怎么确保其中一台挂了,里边的东西不会消失? 有多台server做replication怎么知道刚刚消失的data在replication的哪边? 用多个pointer指每个server目前data的位址很多人要读,偶尔写,要怎么保护? Reader-writer lock 阅读全文