随笔分类 -  lintcode

摘要: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. 阅读全文

posted @ 2020-05-29 16:56 Jain_Shaw 阅读(308) 评论(0) 推荐(0)

摘要:Description Given a sequence of integers, find the longest increasing subsequence (LIS). You code should return the length of the LIS. 找出最长的递增子序列,遍历数组 阅读全文

posted @ 2020-05-19 10:26 Jain_Shaw 阅读(140) 评论(0) 推荐(0)

摘要: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 阅读全文

posted @ 2020-05-13 11:17 Jain_Shaw 阅读(123) 评论(0) 推荐(0)

摘要: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 阅读全文

posted @ 2020-05-09 15:54 Jain_Shaw 阅读(126) 评论(0) 推荐(0)

摘要: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 阅读全文

posted @ 2020-05-06 23:12 Jain_Shaw 阅读(116) 评论(0) 推荐(0)

摘要:Description Count the number of k's between 0 and n. k can be 0 - 9. Example : 实在是想不通这道题为啥会是mid难度的,不就一个遍历的事吗。。。在0~n个数字中,看看数字k出现的频次是多少。但是这个n,我们并不知道有多大, 阅读全文

posted @ 2020-04-28 09:15 Jain_Shaw 阅读(116) 评论(0) 推荐(0)

导航