This repository contains my solutions to various data structures and algorithms problems, spread across varying levels of difficulty (easy, medium, hard), to prepare myself thoroughly for cracking the coding interviews!
This repository contains my solutions to various data structures and algorithms problems, spread across varying levels of difficulty (easy, medium, hard), to prepare myself thoroughly for cracking the coding interviews!
Difficulty level: Easy
Sl. No.
Problem description
Topic
My code (solution)
Remarks
1
You are given a String str. Return the String by Concatenating it with String "Hello, " and an exclamation mark at the end “!”
The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is, F(0) = 0, F(1) = 1 and F(n) = F(n - 1) + F(n - 2), for n > 1. Given n, calculate F(n)
The factorial of a positive integer n is the product of all positive integers less than or equal to n. You’re given a number and you have to calculate it’s factorial using the recursive approach. Note: Factorial of 1 = 1, Factorial of 0 = 1
Given an integer n , return 1(true) if it is a power of two else return 0(false). An integer x is said to be in power of two if and only if there exists an integer i such that 2i == x
This repository contains my solutions to various data structures and algorithms problems, spread across varying levels of difficulty (easy, medium, hard), to prepare myself thoroughly for cracking the coding interviews!