## Calculate (x^y)%z without using pow() function

Problem: Given integers x, y, and z. Write a program to calculate (x^y)%z without pow() function. Example: x = 2, y= 5, z = 3 Output: (2 ^ 5) % 3 = 2 x...

Skip to content# Category: Position

## Calculate (x^y)%z without using pow() function

## Efficient Robot Problem – Find Minimum Trips

## Job Sequencing algorithm – Java

## Find subarray with a sum to given number-2 | Handle negative numbers

## Sort the two dimensional (2D) array – In-place

## Implement/Design the version control map system

## Given an array, count the number of pairs with a given sum.

## Sort Map as per values – Java Program

## Two Sum Problem

## Find if any two intervals overlap in given intervals

## Given an array, find all unique subsets with a given sum with allowed repeated digits.

## Print all steps to convert one string to another string

## Find all subsets of size K from a given number N (1 to N)

## Find all possible combinations with sum K from a given number N(1 to N) with the repetition of numbers is allowed

## Stable Marriage Problem – Gale–Shapley Algorithm – Java

@tutorialhorizon

Problem: Given integers x, y, and z. Write a program to calculate (x^y)%z without pow() function. Example: x = 2, y= 5, z = 3 Output: (2 ^ 5) % 3 = 2 x...

Problem: There is N number of items that need to be transferred from one place to another by a robot. Each item has a specific weight. The robot can carry maximum weight K in...

Objective: You are given n jobs along with the deadline and profit for each job. Your task is to write an algorithm to choose the jobs wisely which can maximize the profit. Also compute...

Problem: Given an array (positive and negative) and an integer, find the subarray with sum is equal to the given integer. Note: This problem is an extension of – find the subarray with sum...

Problem: Given a two-dimensional array where each individual row is sorted in ascending order. Your task to sort the entire 2d array in ascending order. Write an algorithm for the sorting. Example: Given Array:...

Problem: Implement the version control map system which takes the snapshot of the versions of data. Implement the following functions: put(key, value) – puts the value again the key in the latest version of...

Objective: Given an array of integers, write a program to count all the pairs with the given sum. Example: Given array: [1, 5, 7, 1, -1], Sum= 6 Total Pairs: 3 Note: pairs are...

Objective: Given a map which has String as key and Integer as value. Write a program to sort the map in descending order according to the values. Example: Given Map: Joe : 1000 Earl...

Objective: Given an array of integers, and k. Write a program to find indexes of two elements in an array which sum is equal to K. Example: Given array: [5, 4, 7, 3, 9,...

Objective: Interval is defined as [start, end]- the start of an interval to the end of the interval. Given a list of Intervals. Your task is to check if any two intervals overlap. Example:...

Objective: Given an array of integers and number N, Write an algorithm to find and print all the unique subsets of array for which sum is equal to N where array elements can be...

Objective: Given two strings, source string and target string, which are permutation or anagram of each other. You are allowed two swap only consecutive characters. Write an algorithm to print all the steps (...

Objective: Given two integers N and K, Write an algorithm to find subsets of size K from the numbers 1 to N. Example: N = 5 K = 3 Output: [1, 2, 3] [1,...

Objective: Given two integers N and K, Write an algorithm to find possible combinations that add to K, from the numbers 1 to N. Condition: An integer from 1 to N can be repeated...

Stable Marriage Given N men and N women and the marriage preference order for each man and woman. Their marriage will be stable when these men and women marry in such a manner so...

%d bloggers like this: