楼主: Oceanid77
跳转到指定楼层
上一主题 下一主题
收起左侧

刷题记录帖

🔗
 楼主| Oceanid77 2019-12-29 13:26:45 | 只看该作者
全局:
design
基本总结:
declare a class:
include instance varable.
constructore, in constructor, the instance variable are initialized and the relation is declared.
method
return type, input.
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-12-30 12:22:13 | 只看该作者
全局:
281. Zigzag Iterator
173. Binary Search Tree Iterator

128. Longest Consecutive Sequence
How to Traverse through a HashSet in Java
Using an Iterator
Using for-each loop
HashSet<String> h = new HashSet<String>();
  
        // Adding elements into HashSet usind add()
        h.add("Geeks");
        h.add("for");
        h.add("Geeks");
  
        // Iterating over hash set items
        for (String i : h)  
            System.out.println(i);         
    }

547. Friend Circles

BInary tree
226. Invert Binary Tree
done iterative way? think tmor why first time strange idea.

206. Reverse Linked List
similar question

617. Merge Two Binary Trees
recursive  done
iterative not
回复

使用道具 举报

🔗
 楼主| Oceanid77 2020-1-1 03:17:51 | 只看该作者
全局:
617. Merge Two Binary Trees
iterative way : not understan yet
回复

使用道具 举报

🔗
 楼主| Oceanid77 2020-1-2 02:03:56 | 只看该作者
全局:
617. Merge Two Binary Trees
iterative way done stack !
Stack<TreeNode[]> stack = new Stack<>();

145. Binary Tree Postorder Traversal
ArrayList、LinkedList difference
144. Binary Tree Preorder Traversal
iterative way done
94. Binary Tree Inorder Traversal
iterative way done
98. Validate Binary Search Tree
285. Inorder Successor in BST
173. Binary Search Tree Iterator
done inorder traversal
716. Max Stack
done/ pay attention to popMax() - and push()
692. Top K Frequent Words
use heap to sort the string,
not done yet
70. Climbing Stairs
DP study it
回复

使用道具 举报

🔗
 楼主| Oceanid77 2020-1-3 14:11:33 | 只看该作者
全局:
Testing at the Speed and Scale of Google

example 1 not very clear

example two offer a way to determine a way to decide which test to conduct if there is change.

Tree summary
BFS/DFS
Iterative/recursive
stack and queue
preorder/ postorder/inorder traversal
BST: range, update
inorder traversal

543. Diameter of Binary Tree
979. Distribute Coins in Binary Tree

thinking strtegy the same. make  a summary of such kind of problems.

894. All Possible Full Binary Trees
not understand yet.
DP
study tmr
回复

使用道具 举报

🔗
 楼主| Oceanid77 2020-1-5 07:39:59 | 只看该作者
全局:
894. All Possible Full Binary Trees

834. Sum of Distances in Tree
230. Kth Smallest Element in a BST
889. Construct Binary Tree from Preorder and Postorder Traversal!!!
652. Find Duplicate Subtrees
1110. Delete Nodes And Return Forest
回复

使用道具 举报

🔗
 楼主| Oceanid77 2020-1-5 12:19:22 | 只看该作者
全局:
有0和1的矩阵,0表示墙,1表示路,给定起始、终点,求是否存在一条通路(深搜、广搜均可)
follow up1: 写出路径
follow up2: 把1换成2,3,4,5...代表通过这个点的cost,求最短路径(我当时第一反应用深搜,征得面试官同意以后写了代码,后来面试完了想了一下应该是迪杰斯特拉。。。哭again)
链表表示数字,然后求和,比如1->2->3 + 3->2->1(给定两个链表的长度是相同的),不需要写代码,只要尽可能多的给出方法。
follow up: 分别用递归和迭代写一下,然后对算法进行尽可能的优化
是get字符串中连续出现超过三次的字母的起始index和结束index,比如aaabbb,返回{{0, 2}, {3, 5}}
follow up: 大意是返回所有的将连续出现三次的字符修改后的不超过三次的字符串,比如aaabbb->{ab, aab, abb, aabb} (回溯法)

准备BQ 题目
问题包括和队友有冲突怎么达成一致,ddl前project做不完怎么办,有没有学新技术的经历等等。但是感觉follow up的问题会考察你的leadership能力,以及感觉面试官会问的比较深入,抠细节。
刷题网站撕留武
给一堆骰子,每个有6个面,每个面上面有对应的字符串,比如ABCDEF等,可以有重复的比如ABCAAB。问你怎么样组成一个target string 比如 WSASDAJWBB。用backtracking做的,后面问时间复杂度以及怎么优化,说了一个max flow的解,面试官没听懂也没时间了就没深入。
简单题,有一个computer class,每个comuter有一个不同的id,每个computer会传染病毒给其他的computer,问让你找出源头的id,保证只有一个源头。这道题就是找tree的root node。follow up是如果允许重复的id怎么办,最后问如何优化到O(1)space complexity。
medium题,有一个原始iterator,有next()和hasNext(),让你impelement一个新的iterator,除了有next()和hasNext()之外,还可以有一个skip(int element)的功能,其目的是跳过下一个值为element的元素。
回复

使用道具 举报

🔗
 楼主| Oceanid77 2020-1-7 13:59:47 | 只看该作者
全局:
昨天做了什么?
准备了testing的相关的东西, how to generate test plan. ACC.
回复

使用道具 举报

🔗
 楼主| Oceanid77 2020-1-7 15:07:45 | 只看该作者
全局:
今天主要的收获:
risk analysis and risk mitigation.
how to break a system,the trick to do that.
some aspect to consider:
black box- input and output

especially UI:
focus on input. focus input that force the error message to occur. force the software to establish default value. overflow input buffers. repeat the same input or series of input numerous times.
white box- for data structure / overflow/ boundry check/ read write beyond size of allocated array or data structures.
invalid operand and operator combination/ invalid or incorrect data. exception handling.
check if a developer handle the termination case and whether or not an object can interact with itself.
feature share data or interact poorly. error with integration - mixing data type or creating new structures.

回复

使用道具 举报

🔗
 楼主| Oceanid77 2020-1-8 08:45:01 | 只看该作者
全局:
Today's take:
1 attend the meeting with ventoven.
BQ.
make sure we are at the same level. clarify the misunderstanding. respond on time.
understand issue and come up with solution.

bamboo:
is a continuous integration server thst csn be used to automate the release management for software application, creating a continuous delivery pipeline.
build process: compile-run unit testss- run integration tests-package.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表