This is a question from leetcode.com.
Problem Question You are given a series of video clips from a sporting event that lasted T seconds. These video clips can be overlapping with each other and have varied lengths.
Each video clip clips[i] is an interval: it starts at time clips[i][0] and ends at time clips[i][1]. We can cut these clips into segments freely: for example, a clip [0, 7] can be cut into segments [0, 1] + [1, 3] + [3, 7].
This is a question from Airbnb onsite interview, also could be found on leetcode.
Question: We are given an elevation map, heights[i] representing the height of the terrain at that index. The width at each index is 1. After V units of water fall at index K, how much water is at each index?
Assumptions: Now, you should ask some clarify questions and make some assumptions of this questions. There are a lot of good solutions and explanations on leetcode so I will have a different version of the assumption here.
This is a coding problem from Uber onsite interview found here.
Question: Given a list of pairs (tuples), each of them represents a connection from parent to it’s child in a tree. In this list, nodes will have edges not only for their direct children, but also all of it’s descendants (i.e. children’s children, and their children etc).
If we have the following tree as an example:
A / \ B C / \ D E Then the list given it will be
This is actually why (or saying the trigger) I create a website and begin blogging.
Recently I was preparing for changing job. Inevitably I have to prepare for the coding interviews. It was funny that the recruiters from all of the companies I interviewed with suggests online coding websites to get prepared, and first ones of every list is leetcode.com.
During these 3 months in preparing, I was discussing with my teammates/friends about what we want to see from interviews as interviewers.
This is technically first post in this blog. I thought it’s worth to write down the process of creating this static website.
I choose to use English as the language in this blog, which might be helpful in future. Or I may switch to Chinese anyway.
Steps Searched a little bit in zhihu.com and found this post about create website using huge quick start with hugo: https://gohugo.io/getting-started/quick-start/ and hosting on github: https://gohugo.