Arrays And Strings

Find the duplicates in an array.
AskAI

Given an array, this algorithm will find any duplicates within it and output them in a new array.

Anagram Strings
AskAI

An anagram is a word or phrase that is formed by rearranging the letters of another word or phrase. Given an array of strings, this problem asks you to group together all of the anagrams in the array.

First non-repeating character in a string
AskAI

This problem asks you to return the first non-repeating character in a given string. If there is no such character, you should return '-1'.

Longest substring without repeating characters
AskAI

Given a string, the longest substring without repeating characters is found. The length of the substring is then returned.

Given an array of integers, return a new array such that each element at...
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 Sum Contiguous Subarray of Length k
AskAI

Given an array of n integers, the problem is to find the contiguous subarray of length k that has the maximum sum.

Sum of Even Numbers in Array
AskAI

This problem asks the programmer to write a function that takes in an array of integers and returns the sum of the even numbers in the array. An example input and output are given.

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.