Algorithms

Check if Two Strings are Permutations

This problem is about determining whether two strings are permutations of each other. A permutation is a rearrangement of the letters in a string. So, if string1 is "abc " and string2 is "bac", then string2 is a permutation of string1.

183
Mar 02
Group Anagrams

Given an array of strings, the goal is to group together all the strings that are anagrams of each other. For example, the input array ["eat", "tea", " tan", "ate", "nat", "bat"] would return [["ate", "eat", "tea"], ["nat", "tan"], ["bat"]].

194
Mar 02
Maximum Sum Contiguous Subarray of Length k

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

207
Mar 01
Find the first non-repeating character in a string.

Given a string, find and return the first non-repeating character in the string.

211
Mar 01
Two Sum

The problem is asking for the indices of two numbers from an array that add up to a target value. There is always going to be one solution for the given input, and you can't use the same element twice.

209
Mar 01
Longest Increasing Subsequence in an Array

Given an array of integers, find the length of the longest increasing subsequence in the array.

225
Mar 01
Find the Majority Element in an Array

The majority element is the element that appears more than n/2 times in an array of size n.

219
Mar 01
Sum of Array Elements

This technical problem involves finding the sum of all the elements in an array. An example input would be [1, 2, 3, 4, 5], and the corresponding output would be 15 .

207
Feb 28