08 2018 档案

摘要:Given a positive integer N, find and return the longest distance between two consecutive 1's in the binary representation of N. If there aren't two co 阅读全文
posted @ 2018-08-30 17:49 Pickle 阅读(290) 评论(0) 推荐(0) 编辑
摘要:This question is the same as "Max Chunks to Make Sorted" except the integers of the given array are not necessarily distinct, the input array could be 阅读全文
posted @ 2018-08-20 10:38 Pickle 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Given an array arr that is a permutation of [0, 1, ..., arr.length - 1], we split the array into some number of "chunks" (partitions), and individuall 阅读全文
posted @ 2018-08-20 10:37 Pickle 阅读(207) 评论(0) 推荐(0) 编辑
摘要:Given a string S, check if the letters can be rearranged so that two characters that are adjacent to each other are not the same. If possible, output 阅读全文
posted @ 2018-08-20 10:35 Pickle 阅读(232) 评论(0) 推荐(0) 编辑
摘要:A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now given an M x N matrix, return True if and only if the m 阅读全文
posted @ 2018-08-20 10:33 Pickle 阅读(187) 评论(0) 推荐(0) 编辑
摘要:Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Sil 阅读全文
posted @ 2018-08-16 15:01 Pickle 阅读(169) 评论(0) 推荐(0) 编辑
摘要:Given a matrix of M x N elements (M rows, N columns), return all elements of the matrix in diagonal order as shown in the below image. Example: Note: 阅读全文
posted @ 2018-08-16 14:59 Pickle 阅读(319) 评论(0) 推荐(0) 编辑
摘要:Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The 阅读全文
posted @ 2018-08-16 14:58 Pickle 阅读(180) 评论(0) 推荐(0) 编辑
摘要:You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1' 阅读全文
posted @ 2018-08-16 14:57 Pickle 阅读(119) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示