Profile

Scrapbook photo 1
zhang lei
Works at Facebook, Inc.
Attended Chinese Academy of sciences
Lives in Menlo Park
1,620 followers|502,720 views
AboutPosts

Stream

zhang lei

Shared publicly  - 
 
If you are a professional api developer, there are also something you might interested in: Besides creation, the public API supports full CRUD functionalities. You can also Read the metadata of a live video Via Graph API Ex...
1
Add a comment...

zhang lei

Shared publicly  - 
 
In order to play with Facebook Live API, you need to have a app first. It's free to register here: https://developers.facebook.com/apps/ Note: your test app must be in “publish” mode. If the app is in 'dev' mode, the post ca...
1
Add a comment...

zhang lei

Shared publicly  - 
 
[Leetcode] Different Ways to Add Parentheses, Solution
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are + ,  -  and  * . Example 1 Input:  "2-1-1" . ((2-1)-1) = 0
(2-(1-1)) = 2 Output:  [0,...
1
Add a comment...

zhang lei

Shared publicly  - 
 
[Leetcode] Binary Tree Paths, Solution
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1
/ \
2 3
\
5 All root-to-leaf paths are: ["1->2->5", "1->3"] [Thought] 这个主要就是实现题。对树进行深度遍历,在遍历的过程中保存访问节点,当遍历到叶节点的时候,打印出来路径即可。 [Code] 1: class Soluti...
 ·  Translate
1
Add a comment...

zhang lei

Shared publicly  - 
 
[Leetcode] Ugly Number II, Solution
Write a program to find the  n -th ugly number. Ugly numbers are positive numbers whose prime factors only include  2, 3, 5 . For example,  1, 2, 3, 4, 5, 6, 8, 9, 10, 12  is the sequence of the first  10  ugly numbers. Note that  1  is typically treated as...
2
Add a comment...

zhang lei

Shared publicly  - 
 
some good papers of distributed system.
1
1
Add a comment...

zhang lei

Shared publicly  - 
 
After previous blog, I believe you already have your app ready with the right permission setting. There are two ways to create a live video in facebook. Let's go through an example here. I want to create a live video on my pr...
1
Add a comment...

zhang lei

Shared publicly  - 
 
[Leetcode] Product of Array Except Self, Solution
Given an array of  n  integers where  n  > 1,  nums , return an array  output  such that  output[i]  is equal to the product of all the elements of  nums  except  nums[i] . Solve it  without division  and in O( n ). For example, given  [1,2,3,4] , return  [...
Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i]. Solve it without division and in O(n). For example, given [1,2,3...
1
Add a comment...

zhang lei

Shared publicly  - 
 
[Leetcode] Valid Anagram, Solution
Given two strings  s  and  t , write a function to determine if  t  is an anagram of  s . For example, s  = "anagram",  t  = "nagaram", return true. s  = "rat",  t  = "car", return false. Note: You may assume the string contains only lowercase alphabets. [T...
1
Add a comment...

zhang lei

Shared publicly  - 
 
[Leetcode] Single Number III, Solution
Given an array of numbers  nums , in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. For example: Given  nums = [1, 2, 1, 3, 2, 5] , return  [3, 5] . Note : The order ...
1
Add a comment...

zhang lei

Shared publicly  - 
 
[Leetcode] Ugly Number, Solution
Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include  2, 3, 5 . For example,  6, 8  are ugly while  14  is not ugly since it includes another prime factor  7 . Note that  1  is...
1
Add a comment...

zhang lei

Shared publicly  - 
 
Looks Google starts to isolate its service and kill 3rd vendors. Evil!
Recently Google announced the end of support for XMPP based calling with Google Voice. This will happen on May 15, 2014 – that's over 6 months from today. Since your OBi device uses XMPP to communicate with Google servers, the end of support will directly impact how your OBi device can be used ...
1
Add a comment...
Story
Tagline
I conquer super software 'villains' to make the social network a better place for people like you.
Introduction
小磊哥
Education
  • Chinese Academy of sciences
    2005 - 2008
  • University of Science and Technology of China
    2001 - 2005
Basic Information
Gender
Male
Work
Occupation
Infrastructure, Facebook
Skills
Cloud platform, Cloud services, Distributed System, Large scale Database, SQL, Distributed Storage Systems, Server Applications, Restful service, Project Management.
Employment
  • Facebook, Inc.
    Software Engineer, 2014 - present
  • Microsoft
    Software Engineer, 2011 - 2014
  • Microsoft
    Software Engineer, 2008 - 2011
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Menlo Park
Previously
Redmond - Beijing
Links
YouTube
Contributor to