This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hrishikesh.ns.stack; | |
/** | |
* Problem Statement: | |
* ; | |
* Given an array with heights of rectangle (assuming width is 1), we need | |
* to find the largest rectangle area possible. | |
* ; | |
* | |
* @author hrishikesh.mishra |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hrishikesh.ns.queue; | |
import java.util.StringJoiner; | |
/** | |
* Problem | |
* Fixed size array queue using circular array to optimize memory. | |
* | |
* @author hrishikesh.mishra | |
* @link http://hrishikeshmishra.com/fixed-size-array-based-queue/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hrishikesh.ns.queue; | |
import java.util.StringJoiner; | |
/** | |
* Problem: | |
* Dynamic size array based queue. | |
* | |
* @author hrishikesh.mishra | |
* @link http://hrishikeshmishra.com/dynamic-size-array-based-queue/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hrishikesh.narashima.ch5queue; | |
import com.hrishikesh.narashima.ch4stack.ListNode; | |
import java.util.Objects; | |
import java.util.StringJoiner; | |
/** | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hrishikesh.ns.queue; | |
import com.hrishikesh.ns.stack.ListNode; | |
import java.util.Objects; | |
import java.util.StringJoiner; | |
/** | |
* Problem: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hrishikesh.ns.stack; | |
import java.util.Objects; | |
import java.util.StringJoiner; | |
/** | |
* Problem: | |
* Linked Stack implementation | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hrishikesh.narashima.ch5queue; | |
import com.hrishikesh.narashima.ch4stack.Stack; | |
/** | |
* <p> | |
* Implement queue using two stack | |
* | |
* </p> | |
* Created by hrishikesh.mishra |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hrishikesh.narashima.ch5queue; | |
import com.hrishikesh.narashima.ch4stack.LinkedStack; | |
import com.hrishikesh.narashima.ch4stack.Stack; | |
/** | |
* <p> | |
* Implement queue using double stack. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hrishikesh.ns.tree; | |
import com.hrishikesh.ns.queue.LinkedQueue; | |
import com.hrishikesh.ns.queue.Queue; | |
import java.util.Objects; | |
/** | |
* Problem: | |
* Find deepest node of binary tree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hrishikesh.ns.tree; | |
/** | |
* Generate binary tree from sorted array | |
* | |
* @author hrishikesh.mishra | |
* @link http://hrishikeshmishra.com/generate-binary-tree-from-sorted-array/ | |
*/ | |
public class BinarySearchTreeGenerator { |