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 numbers, find the median (middle) value.
Given an array of n integers, this problem looks for the maximum sum of any contiguous subarray within the array.
The problem is to find the first non-repeating character in a given string. The function should take a string as input and return the first non-repeating character.
This problem asks whether a given string is a palindrome. A palindrome is a word or phrase that is the same forwards and backwards. In this case, the input string " racecar" is a palindrome, so the output would be "true".
Given an array of strings, this problem seeks to find the longest common prefix. This can be done by comparing the first string in the array with the second string, then the second string with the third string, and so on. The longest common prefix is the substring that is shared by all strings in the array.
This problem asks you to find the length of the longest substring in a given string without any repeating characters. Examples are provided to illustrate how this would work. Note that the answer must be a substring, not just a subsequence.
This problem asks you to implement an algorithm to determine if a string has all unique characters. This can be done by keeping track of which characters have been seen so far in a hash set, and then checking if the character being processed is already in the set. If it is, then we know that the string does not have all unique characters.