easy-coding-problem

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
strings

String Compression

Problem statement : Write a function to Compress a given string. Only return the compressed string if it saves space. Example: 'BBBAACCCCDD' --> 'B3A2C4D2'.

2 min read • Read
strings

FizzBuzz

Problem Statement: Write a function to implement Fizz-Buzz.

2 min read • Read