Linux Introduction: Part 1

This post is dedicated to all Linux Lovers and someone who wants to get started with same in coming posts we will try to cover each and every aspect of Linux necessary. This series introduction to Linux will focus on basics and cover below parts. History of Linux What is Linux Why we need to … Continue reading Linux Introduction: Part 1

Tower of Hanoi Using Recursion

Tower of Hanoi Using Recursion The tower of Hanoi is a famous puzzle where we have three rods and N disks. The objective of the puzzle is to move the entire stack to another rod. You are given the number of discs N. Initially, these discs are in the rod 1. You need to print all the steps of discs movement so that all the discs reach the 3rd rod. Also, you need to find the total moves. Note: The discs are arranged such that the top disc is numbered 1 and the bottom-most disc is numbered N. Also, all the discs have different sizes and a bigger disc cannot be put on the top of a smaller disc. Refer the provided link to get a better clarity about the puzzle.

Rotate a matrix by 90 degree without using any extra space(Anticlockwise)

Rotate a matrix by 90 degree without using any extra space(Anticlockwise) (Asked by MICROSOFT, PAYTM, SAMSUNG, AMAZON, SNAPDEAL...)