Given a cost 2D matrix having a cost at each cell. Find the minimum cost it will take to reach cell (m, n) from top left corner cell (0, 0) if the only allowed directions to move from a cell are right, down and diagonally down. Java visualization is provided in algorithm visualization section. Java code is given in the code snippet section.

Given an infinite supply of coins of values: {C1, C2, ..., Cn} and a sum. Find minimum number of coins that can represent the sum. Java solution to find minimum number of coins using dynamic programming. Java visualization is provided in algorithm visualization section. Example 1:values: {2, 5, 3} sum = 5Then 5 can be represented as: 2 + 3 = 2 coins5 = 1 coin Therefore, minimum number of coins is 1.Example 2: values: {2, 5, 3}sum = 7 Then 7 can be represented as:2 + 2 + 3 = 3 coins 2…

Given a number, find the next greater number using same digits(or by rearranging the digits). For example, if the given number is 1234 then next greater number would be 1243. For the input 1243, next greater number would be 1324. If the input is 6938652 then the output should be the number 6952368.

Given an array of unordered positive and negative integers, find the maximum subarray sum in the array. This is solved using kadane's algorithm. Java solution is provided in code snippet section. Java visualization is provided in algorithm visualization section.

Merge two sorted arrays without using extra space - Given two sorted arrayA and arrayB such that arrayA has enough void spaces in it to be able to accommodate arrayB in it. Void spaces in an array are denoted using INVALID_NUM. Write a program to merge arrayB into arrayA such that resulting array is a sorted array.

Given an array of integers, print the leaders in the array. A leader is an element which is larger than all the elements in the array to its right. Java solution is provided in code snippet section. Java visualization is provided in algorithm visualization section.

Pancake Sorting - IDeserve

Given an array of size n, find the longest bitonic subsequence in the array. A bitonic sequence a sequence which is first increasing and then decreasing. Java solution is provided in code snippet section. Java visualization is provided in algorithm visualization section.

Find the longest monotonically increasing subsequence in an array. Java solution for finding length of longest increasing subsequence in an array is provided in code snippet section. Java visualization is provided in algorithm visualization section.

Pinterest • The world’s catalogue of ideas
Search