Strings

Find the maximum sum of a contiguous subarray of length k.
AskAI

Contiguous subarray of length k with maximum sum is found.

Find the Longest Substring Without Repeating Characters
AskAI

Given a string, the longest substring without repeating characters is found.

Given a list of strings, return the count of the number of strings where the...
AskAI

Given a list of strings, return the count of the number of strings where the string length is 2 or more and the first and last chars of the string are the same.

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.