Sachin kumar
Sachin kumar
The highest common factor (H.C.F) or greatest common divisor (G.C.D) of two numbers is the largest positive integer that perfectly divides the two given numbers. For example, the H.C.F of...
Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number. Example: Input : n =10 Output :...
Given a number, the task is that we divide number by 3. The input number may be large and it may not be possible to store even if we use...
Given a Queue data structure that supports standard operations like enqueue() and dequeue(). The task is to implement a Stack data structure using only instances of Queue and Queue operations...
Given a very large number num (1
Input: 100 Output: 933262154439441526816992388562667004- 907159682643816214685929638952175999- 932299156089414639761565182862536979- 208272237582511852109168640000000000- 00000000000000
Given an integer n, write a function that returns count of trailing zeroes in n!. Examples : Input: n = 5 Output: 1 Factorial of 5 is 120 which has...
Given a number positive number n, find value of f0 + f1 + f2 + …. + fn where fi indicates i’th Fibonacci number. Remember that f0 = 0, f1...
Given a number , write a program to reverse this number using stack. Examples: Input : 365 Output : 563 Input : 6899 Output : 9986
We are given a stack data structure with push and pop operations, the task is to implement a queue using instances of stack data structure and operations on them.