Arrays And Strings

Longest Increasing Subsequence in an Array
AskAI

The problem is to find the length of the longest increasing subsequence in an array of integers. For example, given the array [0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15], the longest increasing subsequence has length 6: it is 0, 2, 6, 9, 11 , 15.

Two Sum
AskAI

Given an array of integers and a target sum, return the indices of the two numbers that add up to the target sum.

"Array Sum"
AskAI

The "Array Sum" problem asks you to write a function that takes in an array of integers and returns the sum of all the integers in the array.

Maximum Subarray Sum
AskAI

Given an array of integers, this problem seeks to find the maximum sum of any contiguous subarray within the array. For example, given the input array [34, -50, 42, 14, -5, 86], the output would be 137.

Sum of Array Elements
AskAI

Given an array of integers, the function should return the sum of the elements in the array.

Sum of all odd numbers in an array
AskAI

Given an array of integers, this function will return the sum of all the odd numbers in the array.

Lowest Positive Missing Integer
AskAI

Given an array of integers, this function finds the lowest positive integer that does not exist in the array. The array can contain duplicates and negative numbers.

Maximum Average Value in an Array
AskAI

Given an array A of n integers, find the maximum average value for a subarray of given length k.