DescriptionIn LLP world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo’s attac
...
DescriptionGiven an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined
...
DescriptionA zero-indexed array A consisting of N different integers is given. The array contains all integers in the range [0, N - 1].
Sets S[K] for
...
DescriptionIn MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its ori
...
DescriptionGiven an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole arr
...
DescriptionSuppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent p
...
DescriptionGiven an array consists of non-negative integers, your task is to count the number of triplets chosen from the array that can make triangle
...
DescriptionGiven an integer array, find three numbers whose product is maximum and output the maximum product.
ExampleInput: [1,2,3]Output: 6
Note1.Th
...
DescriptionGiven a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks.
...
DescriptionGiven m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array picks o
...