public class Mergesort { public static void merge(int[] list, int start, int middle, int end) { int[] tmp = new int[list.length]; ...
Read More
100 door puzzle program
package com.kartik.puzzle.door; import java.util.ArrayList; import java.util.List; public class Doors { public s...
Read More
Spiral Printing of Rectangle
What is the purpose of Rectangle Spiral Printing? When we create a weave of frequency then we use this logic or principal, we saw diffe...
Read More
Zig Zag Matrix print multiple way
package com.java.zigzag; /** * * @author kmandal * */ public class PrintZigzagMatrix { public static void main(String...
Read More
Gready Alogorithms or knapsack algorithms
package com.kartik.knapsack; public // A Dynamic Programming based solution for 0-1 Knapsack problem class Knapsac...
Read More
understanding recursive method for binary tree
package com.kartik.recursive; import java.util.Map.Entry; import java.util.Queue; import java.util.Stack; import java.util.Linked...
Read More
Dynamic Programming — Maximum size square sub-matrix with all 1s from a matrix
How to fill the auxiliary matrix? Create an auxiliary array of the same size as given input array. We will fill the auxiliary array ...
Read More
Subscribe to:
Posts (Atom)