Arrays And Strings

Array sum
AskAI

This problem asks you to sum the elements of an array of integers. For example, given the input [1, 2, 3, 4], the expected output would be 10 (1 + 2 + 3 + 4 = 10).

Find smallest substring containing all characters in pattern
AskAI

This problem involves finding the smallest substring in a given string that contains all the characters in a given pattern. An example input and output are provided in the problem statement.

Is the Given String a Permutation of a Palindrome?
AskAI

This function takes a string as input and returns true if the string is a permutation of a palindrome. A palindrome is a word or phrase that is the same forwards and backwards. A permutation is a rearrangement of letters.

Find the Longest Substring Without Repeating Characters
AskAI

Given a string, this problem seeks to find the length of the longest substring within that string that does not contain any repeating characters.

Two Sum
AskAI

The "Two Sum" problem is a classic code problem that involves finding two numbers in an array that add up to a specific target. There is always one solution to this problem, and you may not use the same element twice.

Find the Maximum Average Value in an Array
AskAI

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.

Find the Median of an Array
AskAI

Given an array of numbers, find the median (middle) value.

Maximum Subarray Sum
AskAI

Given an array of n integers, this problem looks for the maximum sum of any contiguous subarray within the array.