06 2021 档案

摘要:[抄题]: You need to construct a binary tree from a string consisting of parenthesis and integers. The whole input represents a binary tree. It contains 阅读全文
posted @ 2021-06-28 02:56 苗妙苗 阅读(52) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-06-27 08:07 苗妙苗 阅读(102) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-06-27 06:46 苗妙苗 阅读(30) 评论(0) 推荐(0)
摘要:参考:https://engineering.99x.io/full-stack-serverless-web-apps-with-aws-189d87da024a DynamoDB完全托管于aws,登陆aws控制台后就能用,不需要额外配置服务器。 阅读全文
posted @ 2021-06-20 09:52 苗妙苗 阅读(56) 评论(0) 推荐(0)
摘要:两场面试都挂了好吗!绝对是减分项 阅读全文
posted @ 2021-06-19 01:51 苗妙苗 阅读(25) 评论(0) 推荐(0)
摘要:参考: 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) 阅读全文
posted @ 2021-06-14 03:43 苗妙苗 阅读(33) 评论(0) 推荐(0)
摘要:只有children(),所以要自己去定义。真是多年来的误区 参考:https://docs.oracle.com/javase/7/docs/api/javax/swing/tree/TreeNode.html 阅读全文
posted @ 2021-06-13 02:19 苗妙苗 阅读(69) 评论(0) 推荐(0)
摘要:参考:https://www.geeksforgeeks.org/binary-tree-set-1-introduction/ /* Class containing left and right child of current node and key value*/ class Node { 阅读全文
posted @ 2021-06-10 21:51 苗妙苗 阅读(70) 评论(0) 推荐(0)
摘要:很多台DB server, 怎么确保其中一台挂了,里边的东西不会消失? 有多台server做replication怎么知道刚刚消失的data在replication的哪边? 用多个pointer指每个server目前data的位址很多人要读,偶尔写,要怎么保护? Reader-writer lock 阅读全文
posted @ 2021-06-06 02:36 苗妙苗 阅读(68) 评论(0) 推荐(0)
摘要:参考:https://blog.csdn.net/weixin_41050155/article/details/83834623 给定一棵二叉树,找出它的最小深度。最小深度是沿着从根节点到最近叶节点的最短路径的节点数目。 复习时不会的地方:不知道距离怎么递归,是左右分别+1。(左边不行去右边,此时 阅读全文
posted @ 2021-06-06 02:21 苗妙苗 阅读(274) 评论(0) 推荐(0)
摘要:参考:https://www.geeksforgeeks.org/min-heap-in-java/ 最小堆是如何表示的?最小堆是一棵完全二叉树。最小堆通常表示为一个数组。根元素将在Arr[0] 处。对于任何第 i 个节点,即Arr[i]:Arr[(i -1) / 2]返回其父节点。Arr[(2 * 阅读全文
posted @ 2021-06-03 06:47 苗妙苗 阅读(237) 评论(0) 推荐(0)
摘要:参考:https://www.geeksforgeeks.org/maximum-element-in-a-sorted-and-rotated-array/ 给定在某个未知点旋转的不同元素的排序数组arr[],任务是找到其中的最大元素。例子: 输入: arr[] = {3, 4, 5, 1, 2} 阅读全文
posted @ 2021-06-02 23:34 苗妙苗 阅读(36) 评论(0) 推荐(0)