原创 Lintcode49 Sort Letters by Case solution 題解

【題目描述】Given a string which contains only letters. Sort it by lower case first and upper case second.Notice:It's NOT nece

原创 Lintcode46 Majority Number solution 題解

【題目描述】Given an array of integers, the majority number is the number that occurs more than half of the size of the array.

原创 Lintcode52 Next Permutation solution 題解

【題目描述】Given a list of integers, which denote a permutation.Find the next permutation in ascending order.Notice:The list

原创 Lintcode48 Majority Number III solution 題解

【題目描述】Given an array of integers and a number k, the majority number is the number that occurs more than 1/k of the size

原创 Lintcode47 Majority Number II solution 題解

【題目描述】Given an array of integers, the majority number is the number that occurs more than 1/3 of the size of the array.F

原创 Lintcode50 Product of Array Exclude Itself solution 題解

【題目描述】Given an integers array A.Define B[i] = A[0] * ... * A[i-1] * A[i+1] * ... * A[n-1], calculate B WITHOUT divide op

原创 Lintcode45 Maximum Subarray Difference solution 題解

【題目描述】Given an array with integers.Find two non-overlapping subarrays A and B, which |SUM(A) - SUM(B)| is the largest.Re

原创 Lintcode51 Previous Permutation solution 題解

【題目描述】Given a list of integers, which denote a permutation.Find the previous permutation in ascending order.Notice:The l

原创 程序員常用的刷題網站

1、LintcodeLintcode.com——LintCode網站是國內較大的在線編程&測評網站。此網站提供各大IT公司的算法面試題類型,行分門別類,由簡單到中等,再到難,便於不同水平的程序員進行刷題練習。同時網站支持多種語言(Java,

原创 Lintcode44 Minimum Subarray solution 題解

【題目描述】Given an array of integers, find the subarray with smallest sum.Return the sum of the subarray.Notice:The subarray

原创 Lintcode43 Maximum Subarray III solution 題解

【題目描述】Given an array of integers and a number k, find k non-overlapping subarrays which have the largest sum.The number

原创 Lintcode48 Majority Number III solution 題解

【題目描述】Given an array of integers and a number k, the majority number is the number that occurs more than 1/k of the size

原创 Lintcode51 Previous Permutation solution 題解

【題目描述】Given a list of integers, which denote a permutation.Find the previous permutation in ascending order.Notice:The l

原创 Lintcode46 Majority Number solution 題解

【題目描述】Given an array of integers, the majority number is the number that occurs more than half of the size of the array.

原创 Lintcode45 Maximum Subarray Difference solution 題解

【題目描述】Given an array with integers.Find two non-overlapping subarrays A and B, which |SUM(A) - SUM(B)| is the largest.Re