Profile

Cover photo
Yanbing Shi
118,379 views
AboutPostsPhotos

Stream

Yanbing Shi

Shared publicly  - 
 
1. Resume preparation 2. Basic data structure/algorithm 3. Design question 4. Behavior question 5. C++ language specific question 6. Knowledge about ASP.NET
1
Add a comment...

Yanbing Shi

Shared publicly  - 
 
面试题经常有意无意字面上很含糊,这个时候一定需要和面世官交流搞清楚确切的意思。总结一下每个topic需要澄清的地方: 1. Array: (1) Sorted or not? (2) How many elements? (3) Element type? Int, float, double? (4) What's the range of those numbers? Positive or negative? (5) Cont...
1
Add a comment...

Yanbing Shi

Shared publicly  - 
 
Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the entire input string (not partial). The fun...
1
Add a comment...

Yanbing Shi

Shared publicly  - 
 
Word Ladder I Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Only one letter can be changed at a time Each intermediate word must exist i...
1
Add a comment...

Yanbing Shi

Shared publicly  - 
 
Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and uses constant space. 思路: 1 2 3 4 5 6...
1
Add a comment...

Yanbing Shi

Shared publicly  - 
 
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the value (will always be positive) of the key if the key exists in the cache...
1
Add a comment...

Yanbing Shi

Shared publicly  - 
 
1. Implementation of stack/queue (array and linked list) 2. Binary search tree: insertion, deletion, balance. 3. Heap: creation, insertion. 4. Hash table: array + linked list implementation, collision 5. Sorting: (1) merge so...
1
Add a comment...

Yanbing Shi

Shared publicly  - 
 
Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The matching should cover the entire input string (not...
1
Add a comment...

Yanbing Shi

Shared publicly  - 
 
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 思路: 解这个平面几何题有3个要点: 1. 如何判断共线? 两点成一直线,所以两点没有共线不共线之说。对于点p1(x1, y1),p2(x2, y2),p3(x3, y3)来说,共线的条件是p1-p2连线的斜率与p1-p3连线的斜率...
1
Add a comment...

Yanbing Shi

Shared publicly  - 
 
Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2 ↘ c1 → c2 → c3 ↗ B: b1 → b2 → b3 begin to intersect at node c1. Notes: ...
1
Add a comment...

Yanbing Shi

Shared publicly  - 
 
Given an absolute path for a file (Unix-style), simplify it. For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c" click to show corner cases. Corner Cases: Did you consider the case where path = "/...
1
Add a comment...

Yanbing Shi

Shared publicly  - 
 
Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18]. 思路: 从Insert Interval那题的解法,我们知道了如何判断两个interval是否重合,如果不重合,如何判断先后顺序。那么这题就很简单了,首先...
1
Add a comment...
Basic Information
Gender
Male
Links