摘要:
Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv 阅读全文
摘要:
A magic index in an array A[0...n-1] is defined to be an index such that A[i] = i. Given a sorted array of distinct integers, write a method to find a 阅读全文
摘要:
Imagine a robot sitting on the upper left corner of grid with r rows and c columns. The robot can only move in two directions, right and down, but cer 阅读全文
摘要:
A child is running up a staircase with n steps and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to count how many possible 阅读全文
摘要:
Uber总是考一些系统设计的题目,而且重复率很高,汇总了一下地里的所有design的题目,希望可以跟小伙伴们讨论下。Uber Design Questions1. 让design uber app2. 常见题-Design spotify,主要在问playlist和shuffle list功能。... 阅读全文
摘要:
http://www.geeksforgeeks.org/print-binary-tree-vertical-order/ 1 package algorithms; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 impor... 阅读全文
摘要:
You are playing the followingBulls and Cowsgame with your friend: You write a 4-digit secret number and ask your friend to guess it. Each time your fr... 阅读全文
摘要:
Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.For example:Given n = 13,Return 6... 阅读全文
摘要:
Implement a basic calculator to evaluate a simple expression string.The expression string contains onlynon-negativeintegers,+,-,*,/operators and empty... 阅读全文
摘要:
Given an array of integers, find out whether there are two distinct indicesiandjin the array such that the difference betweennums[i]andnums[j]is at mo... 阅读全文