• Online Assignment
    • Word Density Analysis
    • FAQ
  • Behavior Interview
  • 电面
  • 一些题目

Online Assignment

  • Grading of the assignment will be based on the following:
    • Satisfaction of the requirements specified on the following page
    • Detail orientation
    • Complete documentation presenting the approach and results
  • You are required to submit the assignment within 1 week(s) from the time the assignment email was sent to you.
  • Once you have started the assignment (by clicking the Begin Assignment button below), the upload option will be available only for 48 hours (2 days). To be fair to all applicants, we cannot accept late assignments.
  • It is more important to be complete and thorough rather than to turn in the assignment quickly (unless you are close to missing the deadline).
  • Be sure to upload all the deliverables specified in the next page.

Word Density Analysis

Our Objective:

  • Evaluate core functionality and exception handling (completeness of code)
  • Design on how best to determine relevance, and how best to avoid all the clutter on a busy page
  • OOP
  • Ability to articulate how you built your solution

Expected Deliverables:

  • Executable Jar file or Python files
  • Source Code
  • Documentation - please include examples of sample output from running your program

Given any page (URL), be able to classify the page, and return a list of relevant topics.

We'd like to have you build it generically, but for testing purposes, please consider the following URLs.


Any URL (for testing purposes, please consider the URLs above)


  • List of common topics that best describe the contents of that page
  • e.g. 2-Slice Toaster, Cuisinart CPT-122, Compact toaster

How to run/execute the program:


Q: Can I use external libraries for HTML parsing?

A: Yes, you can.

Q: Can I use external libraries for density collection or analysis?

A: No, this is not allowed.

Q: I am unable to submit my assignment through this webpage. What do I do?

A: Email your submission to your recruiter.

Q: How should I label my submission?

A: Please include your first and last name in the file name.

Q: Can I use an API to complete the assignment?

A: No, please don't use any APIs to get the results. The assignment requires you to build a web crawler

Q: What kind of documentation should I provide?

A: Think about how best you can present the assignment to the grader so that he/she is best able to understand your approach. We would recommend a README file, and clear comments in your code to explain your approach to the problem.

Behavior Interview

  1. 说一说你对 BrightEdge 这个公司的了解。
  2. 谈一个你最喜欢的project。
  3. 在这个project里你遇到什么困难了吗?你是如何解决它的?
  4. 你如何面对工作或者做project时的压力,例如heavy workload, long working time。
  5. 假如一个team里有人不太合作你该咋办?
  6. 你如何做一个不太popular的决定?(别人都不太支持这个决定)
  7. 假如由于你的失误造成了你和你的team members的extra work,你如何解决这个问题?如何跟他们交流?

基本就是这些问题,跟网上大多数的behavior questions差不多,跟托福口语有点像,准备个模板各种套就行。

说一说你对 BrightEdge 这个公司的了解


最开始是在CMU的校招上投的简历,一天就收到on campus的邮件。on campus轻松水过,一个可爱的中国妹子问了4个题:

1.Remove duplicates in a sorted integer array:

public int removeDuplicates(int[] nums)



public int pathSum(int m, int n)


4.生成n-bit的gray code (不知道的童鞋请自行google)

一个无难度题 + 仨leetcode原题。四个题加讲一共花了30分钟,然后妹子说她就准备了四个题...问我有什么问题。她后来说这个公司还处在start up阶段,所以非常累要有心理准备。

结果过了两天又让我面下一轮online coding。这点比较奇怪,因为和我一起的其他童鞋都直接面behavior了,难道是我的assignment做的比较差?我更倾向于认为他们根本忘了我参加过on campus


1.deepest common ancestors (大家怎么都喜欢问这个?)

node有parent指针的。用hashmap记下来的方法他觉得就可以了。 a parking lot. Each lot has several floors, and each floor has many slots. Slots can be in two status: abled or disabled.

Your design should support the following method with high efficiency:

public int getNumberOfCars(int floor)
public int getTotalNumberOfSlots(int floor)
public int geNumberOfDisableSlots(int floor)

这个题真是给我坑坏了。parking lot我也看了挺多,上来就给了一个Class floor, 里面有ArrayList和HashMap<Slot, Car>。三哥说我根本不在乎car你为什么要一个map?我心里想你不在乎car你设计什么parking lot...后来知道他只想要那几个方程返回的total number,所以就把他们都存起来就完了...晕。然后他又问我什么时候更改这些维护的值,我说加一个函数park(int floor)就完了。

说实话我真不懂这题他究竟想干什么,难道就是要我存那几个整数?总之这轮居然也过了...我发现三哥是不会好好问算法题的,总是会带一些design和基础知识(比如设计一个blocking queue或者singleton class)。被搞多了我也学会了


  1. Binary tree lowest common ancestor with parent pointer. 需要O(1)space
  2. Design a parking lot. 需要实现(1)知道第二层停了多少车 (2)知道第二层有多少available残趴

一. 面试官自我介绍,询问我resume的一个项目(10min)

二. 两道算法题

Partition array

  1. input: [1, 2, 3, 6, 0, 0, 3, 1, 9, 0]
  2. output: [1, 2, 3, 6, 3, 1, 9, 0, 0, 0]

Fibonacci number.

Fibonacci number: 1, 1, 2, 3, 5, 8
n = 0 -> 1
n = 1 -> 1
n = 2 -> 2
F(n+2) = F(n+1) + F(n)

三. 一道OO设计题

Parking Garage

  • multiple floors
  • each floor has multiple parking spots
  • parking spots has two types. handicapped or regular parking.

Question: how many regular parking are available at 2nd floor?

  1. You are given the root of the Binary Search Tree and two children nodes, please return the first common ancestor of these two nodes.
  2. Mirror a binary tree.
  3. implement pow(double a, int b)
  4. Find the number of ways to top point in a triangle  
  5. Some complex crawler used for the restaurant menu.
  6. find the most points on a straight line in a 2D graph  

Applied through the career center website in the university. The first response is within a week. 1) 48-hour coding assignment: use Java to write a web scraper for a certain URL. 2) Technical phone interview: routine algorithm questions. 3) Behavioral phone interview: very common interview questions like why do you choose this company, how to handle conflict in a team. 4) Onsite interview: 2 technical interviews + a 5.5-hour coding… 

First, ask you to describe your most recent project, then talk something about your self... All general behavioral questions. Finally a project, design an app to extract certain keywords to describe a random webpage. For example, an amazon page selling a microwave, the result should be like: microwave GT200(model) 100 dollar.  




String permutation,依照之前在cracking coding interview的方法迅速写了一个递归的方法。


于是我依稀记得leetcode上的permutation 2就是讲duplicate怎么处理的,于是用dfs+backtracking的方法重新写了一个可以去除duplicate的版本。同时针对这个算法还争论了一番,最后烙印表示应该是正确的。


leetcode和cracking coding interview都有的原题,如何判断一个Binary Tree是不是Binary Search Tree。由于训练有素,很快就完成了。


尼玛居然还有第三题,而且还是个design的题目,设计一个parking lot。这是一个非常常见的设计题目,stackoverflow有一个帖子对这个题目描述的非常好,可以参考一下。


Round 2:tech电面。一名小印。
Round 3:behavioral电面。


Round 0:HR打电话瞎聊一通。
Round 1:tech电面1。一名老印和一名小印。
第1题:Leetcode原题:由一个binary tree的inorder及preorder traversal结果,重
构原binary tree。

Round 2:tech电面2。国人大哥。
第1题:level sum,算是deep iterator的变种。一个多重nested array,例如{a,{b,c
},{{d},e}},返回level sum = a + 2 * (b + c) + 3 * d + 2 * e。
第2题:First Common Ancestor with parent pointer。What if the parent pointer
is not available?

1. reverse linkedlist CC原题不能更多
2. all characters combinations leetcode原题,不能更多,就是
3. design parking lot

时候,就说DFS还是说全名?Depth first searching?) 我反正都有说。然后,然后
,关键的来了,在答案的帮助下,我终于找到了,终于找到了。不过输入是char array
,他说随意,我说,好吧,那就array吧,然后我array,存在了ArrayList String>>中,中间好像也没有toString(),反正就这样了。开始真的没有做对,还想的
DFS,然后我俩的交流有了一点点尴尬,我说,给我one more minute, 终于,找到了
21点的设计。经典题目就是parking lot,反正我就刚刚开始看design,也答得很差劲
总结?关于design的东西的?CC的design应该还是不错的,亚麻不也是考parking lot