The Tower of Hanoi Solution

Definition: The Tower of Hanoi problem is a puzzle which can be solved by mathematically and can be implemented in programming code as well. The tower is also called Tower of Brahma or Lucas’ Tower. In this, game there are three pegs and one one of them hold n disks. n disks are ordered from higher radius to lower radius from the bottom to top. ...

January 29, 2018 · 4 min · Adnatull Al Masum

UVA 11879 - Multiple of 17

11879 - Multiple of 17 Problem Link: https://uva.onlinejudge.org/external/118/11879.pdf Algorithm: This problem is quite easy. In this, there will be a number which is greater at most 100 digits. So, Its not possible to store it in “long long int” in c++. We will write a program which will take input a string. If the string contains only 0 then the program will be break, otherwise it will enter in another loop. Before entering I will declare two integer variables ‘reminder’ and ‘i’. I will initialize the reminder variable to 0; ...

January 29, 2018 · 2 min · Adnatull Al Masum

UVA 11876 - N + NOD (N)

Description: For a number N, first have to calculate N-1+divisors(N-1) & store it in array (e.g. arr[i]=arr[i-1]+divisors(arr[i-1])). Make a sequence from 1 to until arr[i] becomes greater than 1000000. Then you will be given two numbers A & B, and you will have to find the number of integers from the above sequence which lies within the range [A,B]. Hints = No critical case. Easy problem. Algorithm: Step 1: First find the prime numbers from 1 to 1000000 and store them in an array (was not sure about the range, thats why I calculated till 1000000) . Step 2: Calculate number of divisors for each numbers from 1 to 1000000 and store divisors in each array. (e.g. divisors of 6 are 1,2,3,6. Total 4 divisors. So divisor[6]=4. ) Step 3: To find the divisors of each number, I took help of prime numbers. There is a good tutorial in lightoj.com to find divisors using primes. Link is give below: http://lightoj.com/article_show.php?article=1003 ...

January 29, 2018 · 4 min · Adnatull Al Masum
Post cover

শায়েস্তাগঞ্জ

📍 Location: শায়েস্তাগঞ্জ ...

January 6, 2018 · 1 min · Adnatull Al Masum
Post cover

আগ্রাবাদ

📍 Location: আগ্রাবাদ ...

December 24, 2017 · 1 min · Adnatull Al Masum
Post cover

Post on September 09, 2017

...

September 9, 2017 · 1 min · Adnatull Al Masum
Post cover

চান্দনা

📍 Location: চান্দনা #nohashpolli ...

July 30, 2017 · 1 min · Adnatull Al Masum
Post cover

চান্দনা

📍 Location: চান্দনা ...

July 28, 2017 · 1 min · Adnatull Al Masum
Post cover

Post on July 01, 2017

...

July 1, 2017 · 1 min · Adnatull Al Masum
Post cover

#childhoodplaces #homewhereibelong

#childhoodplaces #homewhereibelong ...

June 29, 2017 · 1 min · Adnatull Al Masum