摘要:There are n cities, and the adjacency matrixarr represents the distance between any two cities.arr[i][j]represents the distance from city i to city j.
阅读全文
摘要:Description Given a sequence of integers, find the longest increasing subsequence (LIS). You code should return the length of the LIS. 找出最长的递增子序列,遍历数组
阅读全文
摘要:Description Given two sorted integer arrays A and B, merge B into A as one sorted array. You may assume that A has enough space (size that is greater
阅读全文
摘要:Description Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represent
阅读全文
摘要:Description Given an array nums of integers and an int k, partition the array (i.e move the elements in "nums") such that: All elements < k are moved
阅读全文
摘要:Description Count the number of k's between 0 and n. k can be 0 - 9. Example : 实在是想不通这道题为啥会是mid难度的,不就一个遍历的事吗。。。在0~n个数字中,看看数字k出现的频次是多少。但是这个n,我们并不知道有多大,
阅读全文