This file contains 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
/**************************************************************** | |
* Singly Linked list implementation (Node as Objects) using javascript | |
* | |
* - Dins | |
*****************************************************************/ | |
// Global Object DS - Data Structure | |
var DS = {}; | |
This file contains 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
/** | |
* Singly Linked list implementation in Java | |
* | |
* Copy the 3 classes in Node.java, LinkedList.java and Main.java in order to run the implementation | |
* | |
* Dinesh | |
* | |
* ____________ _____________ ______________ | |
* |item "test1"| | item "test2"| | item "test3" | | |
* | next |-------->| next |----->| next |------>null |
This file contains 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
/** | |
* Singly Linked list implementation in Java | |
* | |
* Copy the 3 classes in DList.java, DLinkedList.java and Main.java in order to run the implementation | |
* | |
* Dinesh | |
* | |
* ____________ _____________ ______________ | |
* |item "test1"| | item "test2"| | item "test3" | | |
* | next |-------->| next |----->| next |------>null |
This file contains 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
/** | |
* Javascript implementation of Doubly Linked list | |
* | |
* Dinesh | |
* | |
* (More to come) (Add more error handling scenarios) | |
*/ | |
// Global object (namespace) | |
DS = {}; |
This file contains 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
/** | |
* Implementation of Stacks using Linked List | |
* | |
* Dinesh | |
* | |
*/ | |
// Namespace | |
var EX = {}; |
This file contains 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
/** | |
* | |
* Postfix implementation using StackList: | |
* Code for stacklist: https://gist.github.com/dineshrajpurohit/0bb67d29a039f85f2f10 | |
* | |
* Dinesh | |
* | |
* PostFix Expression parsing and getting the result | |
* | |
* e.g: 42+351-*+ ==> 18 |
This file contains 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
/** | |
* Infix to postfix implementation | |
* | |
* Dinesh | |
* | |
* Input: 4+8*6-5/3-2*2+2 ==> 486*+53/-22*-2+ | |
* | |
* Algorithm: | |
* - Whenever an integer/character comes from expression we append to postfix String | |
* - Whenever a operator comes in we check the precedence of the incoming operator with the |
This file contains 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
/** | |
* | |
* Dinesh | |
* | |
* RootedTreeTraversal | |
* - Preorder Traversal | |
* - Postorder Traversal | |
* - Inorder Traversal | |
* - Levelorder Traversal | |
* |
This file contains 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
/** | |
* | |
* Dinesh | |
* | |
* RootedTreeTraversal | |
* - Preorder Traversal | |
* - Postorder Traversal | |
* - Inorder Traversal | |
* - Levelorder Traversal | |
* |
This file contains 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.dinesh.tutorials; | |
class NumberAndRoman{ | |
/** | |
* Converting the Numbers to Roman Numbers | |
* | |
**/ | |
public static String convertToRoman(int num){ | |
String rom = ""; |
OlderNewer