上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 98 下一页
摘要: An N x N board contains only 0s and 1s. In each move, you can swap any 2 rows with each other, or any 2 columns with each other. What is the minimum n 阅读全文
posted @ 2019-04-06 20:21 Veritas_des_Liberty 阅读(927) 评论(0) 推荐(0)
摘要: We have some permutation A of [0, 1, ..., N - 1], where N is the length of A. The number of (global) inversions is the number of i < j with 0 <= i < j 阅读全文
posted @ 2019-04-06 13:40 Veritas_des_Liberty 阅读(229) 评论(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 @ 2019-04-06 12:39 Veritas_des_Liberty 阅读(250) 评论(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 @ 2019-04-06 11:46 Veritas_des_Liberty 阅读(242) 评论(0) 推荐(0)
摘要: Your are given an array of positive integers nums. Count and print the number of (contiguous) subarrays where the product of all the elements in the s 阅读全文
posted @ 2019-04-05 15:10 Veritas_des_Liberty 阅读(329) 评论(0) 推荐(0)
摘要: Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements. Your t 阅读全文
posted @ 2019-04-05 14:38 Veritas_des_Liberty 阅读(216) 评论(0) 推荐(0)
摘要: Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get. 阅读全文
posted @ 2019-04-04 15:54 Veritas_des_Liberty 阅读(198) 评论(0) 推荐(0)
摘要: Given two integers n and k, you need to construct a list which contains n different positive integers ranging from 1 to n and obeys the following requ 阅读全文
posted @ 2019-04-04 14:05 Veritas_des_Liberty 阅读(187) 评论(0) 推荐(0)
摘要: Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the ave 阅读全文
posted @ 2019-04-04 11:39 Veritas_des_Liberty 阅读(237) 评论(0) 推荐(0)
摘要: Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be 阅读全文
posted @ 2019-04-02 22:33 Veritas_des_Liberty 阅读(210) 评论(0) 推荐(0)
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 98 下一页