arrays

arrays

Find Missing Element

Problem Statement: Write a function to find the missing element from given two arrays. Example: [1, 2, 4, 7, 9], [7, 9, 4, 2] --> 1.

3 min read • Read
arrays

Valid Elements in a sorted array

Problem Statement: Write a function to count number of distinct elements in a given sorted array. Example: [1, 1, 2, 3, 4, 4, 5] --> 5

2 min read • Read
arrays

Anagram/Permutation check

Problem statement: Write a function to check whether given two strings are anagrams/permutation. An anagram occurs when two strings can be written using the exact same letters. Example : "abcabc" and "aabbcc" are anagrams.

3 min read • Read