Given an array of n integers, where each integer represents the height of a bar in a bar graph, write a function that returns the maximum area that can be formed by choosing two bars from the array and stacking them on top of each other.
Given an array of n integers, find the contiguous subarray of given length k that has the maximum average value. Output the maximum average value.
Given an array of integers, find the length of the longest increasing subsequence.
Given an array of integers, this problem seeks to find the length of the longest increasing subsequence within that array. For example, given the input array [10, 9, 2, 5 , 3, 7, 101, 18], the longest increasing subsequence would be of length 4.
Given an array of n integers, this algorithm will find the maximum sum of any contiguous subarray of the array. For example, given the input array [1, -3, 2, 1, -1], the algorithm would output 3.
Given a string, find the first non-repeating character. For example, in the string "abacabad", the first non-repeating character is 'c'.
To sum all elements in a list, we can simply iterate through the list and add each element to a running total. This will take O(n) time, where n is the length of the list.
Given an array of integers, this problem seeks to find the length of the longest increasing subsequence within that array. For example, given the input array [10, 9, 2, 5 , 3, 7, 101, 18], the longest increasing subsequence would be of length 4.