## Print all subarrays using recursion

Given an array, write a recursive program to print all the subarrays. See the example below – Example: Input [] = {1, 2, 3, 4} Output: [ 1 ] [ 1 2 ] [...

Skip to content# Author: SJ

## Print all subarrays using recursion

## Find Lexicographically smallest or largest substring of size k

## Largest word in dictionary by removing a few characters from the given string

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

## Check if one string is a subsequence of another string.

## Most frequent word

## 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

@tutorialhorizon

Given an array, write a recursive program to print all the subarrays. See the example below – Example: Input [] = {1, 2, 3, 4} Output: [ 1 ] [ 1 2 ] [...

Given a string and number k, write a program to find the lexicographically smallest substring of size k. Note: This problem can also be asked as find the lexicographically largest substring of size k...

Given a dictionary (list of words) and an input string K. Find the largest word in the dictionary which can be obtained by deleting a few characters in the input string K. Example: Dictionary:...

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...

Objective: Given two strings, write a program to check if any of the given string is a subsequence of another string. Example if given strings are A and B then EITHER A is subsequence...

Objective: Given an array of string, write a program to find the word in the array which appears the maximum number of times. Example: Input: [Algorithms, String, Integer, Integer, Algorithms, String, Integer, Algorithms, String,...

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:...

%d bloggers like this: