摘要: Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3].... Example:(1) Given nums = [1, 5, 1, 1, 6, 4], one possible 阅读全文
posted @ 2017-12-09 12:22 逸朵 阅读(206) 评论(0) 推荐(0)
摘要: Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum number of length k <= m + nfrom digits of the two. The 阅读全文
posted @ 2017-12-09 11:32 逸朵 阅读(286) 评论(0) 推荐(0)
摘要: Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your 阅读全文
posted @ 2017-12-09 08:24 逸朵 阅读(149) 评论(0) 推荐(0)
摘要: You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smal 阅读全文
posted @ 2017-12-09 06:59 逸朵 阅读(114) 评论(0) 推荐(0)
摘要: Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes  阅读全文
posted @ 2017-12-09 01:40 逸朵 阅读(110) 评论(0) 推荐(0)