You are on page 1of 1

FizzBuzz: Write a program that prints the numbers from 1 to 100.

But for multiples


of three print "Fizz" instead of the number and for the multiples of five print
"Buzz". For numbers which are multiples of both three and five, print "FizzBuzz".

Reverse a String: Write a function to reverse a string.

Palindrome: Write a function to determine if a string is a palindrome.

Anagram: Write a function to determine if two strings are anagrams of each other.

Factorial: Write a function to calculate the factorial of a given number.

Binary Search: Implement the binary search algorithm to find an element in a sorted
array.

Merge Sort: Implement the merge sort algorithm to sort an array.

Linked List: Implement a singly linked list and its basic operations like
insertion, deletion, and traversal.

Stack: Implement a stack data structure and its basic operations like push, pop,
and peek.

Queue: Implement a queue data structure and its basic operations like enqueue and
dequeue.

Find Missing Number: Given an array containing n distinct numbers taken from 0, 1,
2, ..., n, find the one that is missing from the array.

Rotate Array: Rotate an array of n elements to the right by k steps.

Two Sum: Given an array of integers, return indices of the two numbers such that
they add up to a specific target.

Maximum Subarray: Find the contiguous subarray within an array, which has the
largest sum.

String Compression: Implement a method to perform basic string compression using


the counts of repeated characters. For example, the string "aabcccccaaa" would
become "a2b1c5a3". If the compressed string would not become smaller than the
original string, your method should return the original string

You might also like