## In a number, add digits until it becomes a single digit

Write a program to add the digits of the given number until the number becomes a single digit number. Example: … Read more

Write a program to add the digits of the given number until the number becomes a single digit number. Example: … Read more

Given a source directory, write a recursive program to print all the nested directories and files in the source directory. … Read more

Given an array, write a recursive program to print all the subarrays. See the example below – Example: Input [] … Read more

Objective: Given an array of integers and number N, Write an algorithm to find and print all the unique subsets … Read more

Objective: Given two strings, source string and target string, which are permutation or anagram of each other. You are allowed … Read more

Objective: Given two integers N and K, Write an algorithm to find subsets of size K from the numbers 1 … Read more

Objective: Given two integers N and K, Write an algorithm to find possible combinations that add to K, from the … Read more

Objective: Given an array of integers and number N, Write an algorithm to find and print all the subsets of … Read more

Objective: Given an integer N, Write an algorithm to select numbers from 1 to 9 and make combinations such that … Read more

Objective: Given a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of distinct or unique islands. … Read more

Objective: Given a two-dimensional array or matrix, Do the depth-First Search (DFS) to print the elements of the given matrix. … Read more

Objective: Given a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of islands. An island is … Read more

Objective: Given a number N, write an algorithm to find the maximum number of steps it takes to transform (1, … Read more

Objective: Given a stack, write a program to print the stack elements in reverse order. Example: Approach: Use Temporary stack: … Read more

Objective: Given an array of numbers, write an algorithm to print all the subsets sum individually. Example: Given Input: [1, … Read more