Arrays And Strings

Return the sum of elements in an array.
AskAI

This problem asks you to write a function that takes in an array of integers and returns the sum of all the elements in the array.

Find maximum average value in array of integers
AskAI

This problem asks you to find the maximum average value in an array of integers. You are given the length of the subarray (k) and must output the maximum average value.

Find the First Missing Positive Integer
AskAI

Given an array of integers, this problem seeks to find the first missing positive integer, in other words, the lowest positive integer that does not exist in the array. The array can contain dupl icates and negative numbers as well.

Product of array elements except the one at index i
AskAI

Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i.

Find the maximum average value in a given array of integers.
AskAI

Given an array of n integers, this code problem finds the contiguous subarray of given length k that has the maximum average value. The output is the maximum average value.

Checking for Permutations
AskAI

This function checks if one string is a permutation of another.

Maximum average value of contiguous subarray of given length
AskAI

Find the contiguous subarray of given length k that has the maximum average value in an array of n integers. Output the maximum average value.

Longest Palindromic Substring
AskAI

Write a function that returns the length of the longest palindromic substring in a given string of characters.