From be131578d0bee5974bb588b9d1a89ac170868bcf Mon Sep 17 00:00:00 2001 From: Tejaswini2112 Date: Mon, 10 Nov 2025 13:26:12 -0600 Subject: [PATCH] precourse 1 Done --- .idea/.gitignore | 5 + .idea/misc.xml | 6 ++ .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 ++ Exercise_1.java | 58 ++++++++++-- Exercise_2.java | 52 ----------- Exercise_3.java | 70 -------------- LinkedList.java | 88 ++++++++++++++++++ PreCourse-1.iml | 11 +++ StackAsLinkedList.java | 80 ++++++++++++++++ out/production/PreCourse-1/.idea/.gitignore | 5 + out/production/PreCourse-1/.idea/misc.xml | 6 ++ out/production/PreCourse-1/.idea/modules.xml | 8 ++ out/production/PreCourse-1/.idea/vcs.xml | 6 ++ out/production/PreCourse-1/Exercise_1.cpp | 54 +++++++++++ out/production/PreCourse-1/Exercise_1.js | 35 +++++++ out/production/PreCourse-1/Exercise_1.py | 24 +++++ out/production/PreCourse-1/Exercise_2.cpp | 52 +++++++++++ out/production/PreCourse-1/Exercise_2.js | 36 +++++++ out/production/PreCourse-1/Exercise_2.py | 32 +++++++ out/production/PreCourse-1/Exercise_3.cpp | 80 ++++++++++++++++ out/production/PreCourse-1/Exercise_3.js | 49 ++++++++++ out/production/PreCourse-1/Exercise_3.py | 32 +++++++ .../PreCourse-1/LinkedList$Node.class | Bin 0 -> 416 bytes out/production/PreCourse-1/LinkedList.class | Bin 0 -> 1185 bytes out/production/PreCourse-1/Main.class | Bin 0 -> 1090 bytes out/production/PreCourse-1/PreCourse-1.iml | 11 +++ out/production/PreCourse-1/README.md | 11 +++ out/production/PreCourse-1/Stack.class | Bin 0 -> 1066 bytes .../StackAsLinkedList$StackNode.class | Bin 0 -> 455 bytes .../PreCourse-1/StackAsLinkedList.class | Bin 0 -> 1870 bytes 31 files changed, 694 insertions(+), 131 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml delete mode 100644 Exercise_2.java delete mode 100644 Exercise_3.java create mode 100644 LinkedList.java create mode 100644 PreCourse-1.iml create mode 100644 StackAsLinkedList.java create mode 100644 out/production/PreCourse-1/.idea/.gitignore create mode 100644 out/production/PreCourse-1/.idea/misc.xml create mode 100644 out/production/PreCourse-1/.idea/modules.xml create mode 100644 out/production/PreCourse-1/.idea/vcs.xml create mode 100644 out/production/PreCourse-1/Exercise_1.cpp create mode 100644 out/production/PreCourse-1/Exercise_1.js create mode 100644 out/production/PreCourse-1/Exercise_1.py create mode 100644 out/production/PreCourse-1/Exercise_2.cpp create mode 100644 out/production/PreCourse-1/Exercise_2.js create mode 100644 out/production/PreCourse-1/Exercise_2.py create mode 100644 out/production/PreCourse-1/Exercise_3.cpp create mode 100644 out/production/PreCourse-1/Exercise_3.js create mode 100644 out/production/PreCourse-1/Exercise_3.py create mode 100644 out/production/PreCourse-1/LinkedList$Node.class create mode 100644 out/production/PreCourse-1/LinkedList.class create mode 100644 out/production/PreCourse-1/Main.class create mode 100644 out/production/PreCourse-1/PreCourse-1.iml create mode 100644 out/production/PreCourse-1/README.md create mode 100644 out/production/PreCourse-1/Stack.class create mode 100644 out/production/PreCourse-1/StackAsLinkedList$StackNode.class create mode 100644 out/production/PreCourse-1/StackAsLinkedList.class diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..a0ccf77bc --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Environment-dependent path to Maven home directory +/mavenHomeManager.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 000000000..89ee75358 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..a866e1a9f --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..35eb1ddfb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Exercise_1.java b/Exercise_1.java index 314a3cb45..99c2385ec 100644 --- a/Exercise_1.java +++ b/Exercise_1.java @@ -1,4 +1,12 @@ -class Stack { +// Time Complexity : O(1) for push(), pop(), peek(), and isEmpty() +// Space Complexity : O(n) for storing n elements in the stack +// Did this code successfully run on Leetcode : +// Any problem you faced while coding this : None + + +// Your code here along with comments explaining your approach + +class Stack { //Please read sample.java file before starting. //Kindly include Time and Space complexity at top of each file static final int MAX = 1000; @@ -6,30 +14,62 @@ class Stack { int a[] = new int[MAX]; // Maximum size of Stack boolean isEmpty() - { - //Write your code here + { +// return true if stack is empty + if(top == -1){ + return true; + } else { + return false; + } } Stack() { - //Initialize your constructor - } - + //Initialize your constructor + top = -1; + } + boolean push(int x) - { + { +// insert an element on top of stack //Check for stack Overflow //Write your code here + if (top == MAX-1) { + System.out.println("Stack Overflow"); + return false; + } else { + top++; + a[top] = x; + return true; + } } int pop() - { + { +// pop the topmost element of stack //If empty return 0 and print " Stack Underflow" //Write your code here + if (top == -1) { + System.out.println("Stack Underflow"); + return 0; + } else { + int ele = a[top]; + top--; + return ele; + } + + } int peek() - { + { +// return the topmost element of stack //Write your code here + if (top == -1) { + return 0; + } else { + return a[top]; + } } } diff --git a/Exercise_2.java b/Exercise_2.java deleted file mode 100644 index 5a9c4868c..000000000 --- a/Exercise_2.java +++ /dev/null @@ -1,52 +0,0 @@ -public class StackAsLinkedList { - - StackNode root; - - static class StackNode { - int data; - StackNode next; - - StackNode(int data) - { - //Constructor here - } - } - - - public boolean isEmpty() - { - //Write your code here for the condition if stack is empty. - } - - public void push(int data) - { - //Write code to push data to the stack. - } - - public int pop() - { - //If Stack Empty Return 0 and print "Stack Underflow" - //Write code to pop the topmost element of stack. - //Also return the popped element - } - - public int peek() - { - //Write code to just return the topmost element without removing it. - } - - //Driver code - public static void main(String[] args) - { - - StackAsLinkedList sll = new StackAsLinkedList(); - - sll.push(10); - sll.push(20); - sll.push(30); - - System.out.println(sll.pop() + " popped from stack"); - - System.out.println("Top element is " + sll.peek()); - } -} diff --git a/Exercise_3.java b/Exercise_3.java deleted file mode 100644 index fb66d329d..000000000 --- a/Exercise_3.java +++ /dev/null @@ -1,70 +0,0 @@ -import java.io.*; - -// Java program to implement -// a Singly Linked List -public class LinkedList { - - Node head; // head of list - - // Linked list Node. - // This inner class is made static - // so that main() can access it - static class Node { - - int data; - Node next; - - // Constructor - Node(int d) - { - //Write your code here - } - } - - // Method to insert a new node - public static LinkedList insert(LinkedList list, int data) - { - // Create a new node with given data - - // If the Linked List is empty, - // then make the new node as head - - // Else traverse till the last node - // and insert the new_node there - - // Insert the new_node at last node - // Return the list by head - - } - - // Method to print the LinkedList. - public static void printList(LinkedList list) - { - // Traverse through the LinkedList - - // Print the data at current node - - // Go to next node - } - - // Driver code - public static void main(String[] args) - { - /* Start with the empty list. */ - LinkedList list = new LinkedList(); - - // - // ******INSERTION****** - // - - // Insert the values - list = insert(list, 1); - list = insert(list, 2); - list = insert(list, 3); - list = insert(list, 4); - list = insert(list, 5); - - // Print the LinkedList - printList(list); - } -} \ No newline at end of file diff --git a/LinkedList.java b/LinkedList.java new file mode 100644 index 000000000..d8c7ec7be --- /dev/null +++ b/LinkedList.java @@ -0,0 +1,88 @@ +// Time Complexity : insert() -> O(1), printList() -> O(n) +// Space Complexity : O(n) +// Did this code successfully run on Leetcode : +// Any problem you faced while coding this : No + +// Your code here along with comments explaining your approach + +import java.io.*; + +// Java program to implement +// a Singly Linked List +public class LinkedList { + + Node head;// head of list + Node tail;//tail of list + + // Linked list Node. + // This inner class is made static + // so that main() can access it + static class Node { + + int data; + Node next; + + // Constructor + Node(int d) + { + this.data = d; + //Write your code here + } + } + + // Method to insert a new node + public static LinkedList insert(LinkedList list, int data) + { + // Create a new node with given data + Node node = new Node(data); + + // If the Linked List is empty, + // then make the new node as head + // Else append the new node at the end and update tail + if (list.head == null) { + list.head = node; + list.tail = node; + return list; + } else { + list.tail.next = node; + list.tail = node; + return list; + } + + + } + + // Method to print the LinkedList. + public static void printList(LinkedList list) + { +// assign head to a temp node +// print data of each node until temp is null + Node temp = list.head; + while (temp!= null) { + System.out.println(temp.data); + temp = temp.next; + } + + } + + // Driver code + public static void main(String[] args) + { + /* Start with the empty list. */ + LinkedList list = new LinkedList(); + + // + // ******INSERTION****** + // + + // Insert the values + list = insert(list, 1); + list = insert(list, 2); + list = insert(list, 3); + list = insert(list, 4); + list = insert(list, 5); + + // Print the LinkedList + printList(list); + } +} \ No newline at end of file diff --git a/PreCourse-1.iml b/PreCourse-1.iml new file mode 100644 index 000000000..b107a2dd8 --- /dev/null +++ b/PreCourse-1.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/StackAsLinkedList.java b/StackAsLinkedList.java new file mode 100644 index 000000000..e34e08450 --- /dev/null +++ b/StackAsLinkedList.java @@ -0,0 +1,80 @@ +// Time Complexity : O(1) for all main operations (push, pop, peek, isEmpty) +// Space Complexity : O(n) for n elements in the stack +// Did this code successfully run on Leetcode : +// Any problem you faced while coding this : No + +public class StackAsLinkedList { + + StackNode root; + + static class StackNode { + int data; + StackNode next; + + StackNode(int data) + { + //Constructor here + this.data = data; + } + } + + + public boolean isEmpty() + { + return root == null; + //Write your code here for the condition if stack is empty. + } + + public void push(int data) + { +// push data to stack from the front +// newly created node will point to current root + StackNode node = new StackNode(data); + if (root == null) { + root = node; + } else { + node.next = root; + root = node; + } + //Write code to push data to the stack. + } + + public int pop() + { +// pop the root node by assigning root to root.next + if (root == null) { + System.out.println("Stack Underflow"); + return 0; + } else { + int ele = root.data; + root = root.next; + return ele; + } + } + + public int peek() + { +// return the topmost element + if (root == null) { + return 0; + } else { + return root.data; + } + //Write code to just return the topmost element without removing it. + } + + //Driver code + public static void main(String[] args) + { + + StackAsLinkedList sll = new StackAsLinkedList(); + + sll.push(10); + sll.push(20); + sll.push(30); + + System.out.println(sll.pop() + " popped from stack"); + + System.out.println("Top element is " + sll.peek()); + } +} diff --git a/out/production/PreCourse-1/.idea/.gitignore b/out/production/PreCourse-1/.idea/.gitignore new file mode 100644 index 000000000..a0ccf77bc --- /dev/null +++ b/out/production/PreCourse-1/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Environment-dependent path to Maven home directory +/mavenHomeManager.xml diff --git a/out/production/PreCourse-1/.idea/misc.xml b/out/production/PreCourse-1/.idea/misc.xml new file mode 100644 index 000000000..89ee75358 --- /dev/null +++ b/out/production/PreCourse-1/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/out/production/PreCourse-1/.idea/modules.xml b/out/production/PreCourse-1/.idea/modules.xml new file mode 100644 index 000000000..a866e1a9f --- /dev/null +++ b/out/production/PreCourse-1/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/out/production/PreCourse-1/.idea/vcs.xml b/out/production/PreCourse-1/.idea/vcs.xml new file mode 100644 index 000000000..35eb1ddfb --- /dev/null +++ b/out/production/PreCourse-1/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/out/production/PreCourse-1/Exercise_1.cpp b/out/production/PreCourse-1/Exercise_1.cpp new file mode 100644 index 000000000..2fa5da66c --- /dev/null +++ b/out/production/PreCourse-1/Exercise_1.cpp @@ -0,0 +1,54 @@ +#include + +using namespace std; + +#define MAX 1000 + +class Stack { + //Please read sample.java file before starting. + //Kindly include Time and Space complexity at top of each file + int top; + +public: + int a[MAX]; // Maximum size of Stack + + Stack() { //Constructor here } + bool push(int x); + int pop(); + int peek(); + bool isEmpty(); +}; + +bool Stack::push(int x) +{ + //Your code here + //Check Stack overflow as well +} + +int Stack::pop() +{ + //Your code here + //Check Stack Underflow as well +} +int Stack::peek() +{ + //Your code here + //Check empty condition too +} + +bool Stack::isEmpty() +{ + //Your code here +} + +// Driver program to test above functions +int main() +{ + class Stack s; + s.push(10); + s.push(20); + s.push(30); + cout << s.pop() << " Popped from stack\n"; + + return 0; +} diff --git a/out/production/PreCourse-1/Exercise_1.js b/out/production/PreCourse-1/Exercise_1.js new file mode 100644 index 000000000..207189ea0 --- /dev/null +++ b/out/production/PreCourse-1/Exercise_1.js @@ -0,0 +1,35 @@ +class Stack { + //Please read sample.java file before starting. + //Kindly include Time and Space complexity at top of each file +​ + constructor() { + //Initialize your constructor + this.MAX = 1000; + this.top = -1; + this.a = new Array(this.MAX); + } +​ + function isEmpty() { + //Write your code here + } +​ + function push(x) { + //Check for stack Overflow + //Write your code here + } +​ + function pop() { + //If empty return 0 and print " Stack Underflow" + //Write your code here + } +​ + function peek() { + //Write your code here + } +} +​ +let s = new Stack(); +s.push(10); +s.push(20); +s.push(30); +console.log(s.pop() + " Popped from stack"); diff --git a/out/production/PreCourse-1/Exercise_1.py b/out/production/PreCourse-1/Exercise_1.py new file mode 100644 index 000000000..532833f5d --- /dev/null +++ b/out/production/PreCourse-1/Exercise_1.py @@ -0,0 +1,24 @@ +class myStack: + #Please read sample.java file before starting. + #Kindly include Time and Space complexity at top of each file + def __init__(self): + + def isEmpty(self): + + def push(self, item): + + def pop(self): + + + def peek(self): + + def size(self): + + def show(self): + + +s = myStack() +s.push('1') +s.push('2') +print(s.pop()) +print(s.show()) diff --git a/out/production/PreCourse-1/Exercise_2.cpp b/out/production/PreCourse-1/Exercise_2.cpp new file mode 100644 index 000000000..054ad0d1b --- /dev/null +++ b/out/production/PreCourse-1/Exercise_2.cpp @@ -0,0 +1,52 @@ +#include +using namespace std; + +// A structure to represent a stack +class StackNode { +public: + int data; + StackNode* next; +}; + +StackNode* newNode(int data) +{ + StackNode* stackNode = new StackNode(); + stackNode->data = data; + stackNode->next = NULL; + return stackNode; +} + +int isEmpty(StackNode* root) +{ + //Your code here +} + +void push(StackNode** root, int data) +{ + //Your code here +} + +int pop(StackNode** root) +{ + //Your code here +} + +int peek(StackNode* root) +{ + //Your code here +} + +int main() +{ + StackNode* root = NULL; + + push(&root, 10); + push(&root, 20); + push(&root, 30); + + cout << pop(&root) << " popped from stack\n"; + + cout << "Top element is " << peek(root) << endl; + + return 0; +} \ No newline at end of file diff --git a/out/production/PreCourse-1/Exercise_2.js b/out/production/PreCourse-1/Exercise_2.js new file mode 100644 index 000000000..2e3216f94 --- /dev/null +++ b/out/production/PreCourse-1/Exercise_2.js @@ -0,0 +1,36 @@ +class StackAsLinkedList { +​ + static stackNode = class { +​ + constructor(d) { + //Constructor here + this.data = d; + this.next = null; + } + } +​ + function isEmpty() { + //Write your code here for the condition if stack is empty. + } +​ + function push(data) { + //Write code to push data to the stack. + } +​ + function pop() { + //If Stack Empty Return 0 and print "Stack Underflow" + //Write code to pop the topmost element of stack. + //Also return the popped element + } +​ + function peek() { + //Write code to just return the topmost element without removing it. + } +} +//Driver code +const sll = new StackAsLinkedList(); +sll.push(10); +sll.push(20); +sll.push(30); +console.log(sll.pop() + " popped from stack"); +console.log("Top element is " + sll.peek()); diff --git a/out/production/PreCourse-1/Exercise_2.py b/out/production/PreCourse-1/Exercise_2.py new file mode 100644 index 000000000..b11492215 --- /dev/null +++ b/out/production/PreCourse-1/Exercise_2.py @@ -0,0 +1,32 @@ + +class Node: + def __init__(self, data): + self.data = data + self.next = None + +class Stack: + def __init__(self): + + def push(self, data): + + def pop(self): + +a_stack = Stack() +while True: + #Give input as string if getting an EOF error. Give input like "push 10" or "pop" + print('push ') + print('pop') + print('quit') + do = input('What would you like to do? ').split() + #Give input as string if getting an EOF error. Give input like "push 10" or "pop" + operation = do[0].strip().lower() + if operation == 'push': + a_stack.push(int(do[1])) + elif operation == 'pop': + popped = a_stack.pop() + if popped is None: + print('Stack is empty.') + else: + print('Popped value: ', int(popped)) + elif operation == 'quit': + break diff --git a/out/production/PreCourse-1/Exercise_3.cpp b/out/production/PreCourse-1/Exercise_3.cpp new file mode 100644 index 000000000..40baf9cef --- /dev/null +++ b/out/production/PreCourse-1/Exercise_3.cpp @@ -0,0 +1,80 @@ +#include +using namespace std; + +// A linked list node (changes) +class Node +{ + public: + int data; + Node *next; +}; + +/* Given a reference (pointer to pointer) +to the head of a list and an int, inserts +a new node on the front of the list. */ +void push(Node** head_ref, int new_data) +{ + /* 1. allocate node */ + + /* 2. put in the data */ + + /* 3. Make next of new node as head */ + + /* 4. move the head to point to the new node */ +} + +/* Given a node prev_node, insert a new node after the given +prev_node */ +void insertAfter(Node* prev_node, int new_data) +{ + /*1. check if the given prev_node is NULL */ + + /* 2. allocate new node */ + + /* 3. put in the data */ + + /* 4. Make next of new node as next of prev_node */ + + /* 5. move the next of prev_node as new_node */ +} + +/* Given a reference (pointer to pointer) to the head +of a list and an int, appends a new node at the end */ +void append(Node** head_ref, int new_data) +{ + /* 1. allocate node */ + + /* 2. put in the data */ + + /* 3. This new node is going to be + the last node, so make next of + it as NULL*/ + + /* 4. If the Linked List is empty, + then make the new node as head */ + + /* 5. Else traverse till the last node */ + + /* 6. Change the next of last node */ +} + +// This function prints contents of +// linked list starting from head +void printList(Node *node) +{ + //Your code here +} + +/* Driver code*/ +int main() +{ + Node* head = NULL; + append(&head, 6); + push(&head, 7); + push(&head, 1); + append(&head, 4); + insertAfter(head->next, 8); + cout<<"Created Linked list is: "; + printList(head); + return 0; +} \ No newline at end of file diff --git a/out/production/PreCourse-1/Exercise_3.js b/out/production/PreCourse-1/Exercise_3.js new file mode 100644 index 000000000..d1511f80e --- /dev/null +++ b/out/production/PreCourse-1/Exercise_3.js @@ -0,0 +1,49 @@ +// Java program to implement +// a Singly Linked List +class LinkedList { + constructor() { + this.head = null; + } + // Linked list Node. + static Node = class { + constructor(d) { + this.data = d; + this.next = null; + } + } +​ + // Method to insert a new node + function insert(list, data) { + // Create a new node with given data +​ + // If the Linked List is empty, + // then make the new node as head +​ + // Else traverse till the last node + // and insert the new_node there +​ + // Insert the new_node at last node + // Return the list by head + } +​ + // Method to print the LinkedList. + function printList(list) { + // Traverse through the LinkedList +​ + // Print the data at current node +​ + // Go to next node + } +} + // Driver code + /* Start with the empty list. */ + let list = new LinkedList(); +​ + // ******INSERTION****** + // Insert the values + list.insert(list, 1); + list.insert(list, 2); + list.insert(list, 3); + list.insert(list, 4); + // Print the LinkedList + list.printList(list); diff --git a/out/production/PreCourse-1/Exercise_3.py b/out/production/PreCourse-1/Exercise_3.py new file mode 100644 index 000000000..a5d466b59 --- /dev/null +++ b/out/production/PreCourse-1/Exercise_3.py @@ -0,0 +1,32 @@ +class ListNode: + """ + A node in a singly-linked list. + """ + def __init__(self, data=None, next=None): + +class SinglyLinkedList: + def __init__(self): + """ + Create a new singly-linked list. + Takes O(1) time. + """ + self.head = None + + def append(self, data): + """ + Insert a new element at the end of the list. + Takes O(n) time. + """ + + def find(self, key): + """ + Search for the first element with `data` matching + `key`. Return the element or `None` if not found. + Takes O(n) time. + """ + + def remove(self, key): + """ + Remove the first occurrence of `key` in the list. + Takes O(n) time. + """ diff --git a/out/production/PreCourse-1/LinkedList$Node.class b/out/production/PreCourse-1/LinkedList$Node.class new file mode 100644 index 0000000000000000000000000000000000000000..35130dbcd57f4663d208c3a642f2178b4d6b9149 GIT binary patch literal 416 zcmZ8d%TB^T6g>llmRfnKh(e4D7r;V3K;s5uBx!J=VL#A`4%Rkl2jg$KFeWbi06)rj zrkZG6+}GT5&fI%HKHuH}oTKlfgt7}KKm}ES=1M-waV(SD@zr9bmPVj@suOL_1j>Wq zyao?77k+>Z1OkmvC-*7}b#9JkX`}?4NE#_1rc4v{M1Cv$2RdPEFdfbrCI!c;sM-2q zp|Tsfh^f*J)1{2(GSjyHd34O3&M6%U_}A$=TdE6f!GDH0w&M$UGnJdmG&e5x2>$(F zAebhJ$|kYQb44-7PK`ruRpLFYaW8sc6Loq)tDwQyWOhM>#rUIFh*9qa?lY?rTJ&|4 p>3eX{M-2yPv+8`Ku~lf1hi$6!lGrJD9qbmdi+x6)9S>bO7j2! literal 0 HcmV?d00001 diff --git a/out/production/PreCourse-1/LinkedList.class b/out/production/PreCourse-1/LinkedList.class new file mode 100644 index 0000000000000000000000000000000000000000..7ad38114eba535a472a15ef3db7d4f42805f6f31 GIT binary patch literal 1185 zcmZuwX-^YT6g{sC(<#GRTa}`+Y8RmH8;ABy?UfPHkRL1tA@!on#P5ecMQGYOlra9SUD&g;O$SqvFSTNuWAPy*K8ysLZd1VO%tefv29J0es;3ml%J!1n`5)udcj#1? zt|ySnylg3@`%Rf#Z(~*yk^Tmu6DM4=o2ACCUvVD0idn}f%qZ;yx|f}1u;eKAie1t3 z9DlJUn@xw?h#D7+QjrkHPyIO{v`}rQjX|!c}dx z1FqpZccyAfJNO;K`~mrIFxJxhFqd+BuzsR1H}x5oGK0AfJR0OG+1}DUtW%63#`UBI z>?dRrQy9WD=dOSWa?8?7r5|afzzvt zN`Ya;%g+Bm@)OSF_i+9T#`sCv@BjW*MYkBGs0%PhdygpdNZ>xwSkNp|Eu1!sC|}HN z<`z1)iO?aU%$;P|9o%gvf7?z@b$ZtJammg{4v?|)QEj`lHMEUsdw{8<2DH?9!n#(_ zi&ggSDb;z#+Dm*!Wj5hO2d_M4$y=!~t{L)`vIf=6dDhVCxq$~<#YxWKY&=BlA8yOl AIRF3v literal 0 HcmV?d00001 diff --git a/out/production/PreCourse-1/Main.class b/out/production/PreCourse-1/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..404e373477c6a8ba9006f7604d9344420674e45a GIT binary patch literal 1090 zcmaJ=>rN9v6#mARF08AqTm==Yf)*-Nyle3it3;AT(IQ0sVTSEUhi-Q^yHg@>;%n#+ zNHFmMd?@3YT@p%YoF8*J=gjw=^Ua(;e-C~Gc!}pWP9b9<>!1%ghQc=A;T4|;Ta~w) z+rrZfxkVXB{gfe7npwBd&(K%b+-upekTKI~2M*3KWW!F}q@}bx^JxHi6fB%`Fo>aJ zu=U+oi#DOD4uOxj387S#)kp@qt|P(QRf9U>U=(8%7pgGfULK^3#~n=I0>fCFw?s_^ z9@iUEH)$7Z9_W}5i9Q8QsvtxeY!TumOj@|?pol9BLp@j-tkC4(2L|LMgem?SmAAqr zMPzHLAsF(m48)sGds9SfeA6e(psPIYuk%Qn^Pw@To04+Nx#n_}ZnqPV(bDH$Jmlxm z7R3+sa5FISSZ?wL1ZCG%C-TISH01eL-$dleSbSNSHzkttFO<@;j(E5tbW=6re%v8o zR$NtKC>q7Dk!lx7JFk_`;hv5Acwph7QTY+W)X{H{!H#N)N-Ae6{1W%Higp>kcdK<6 zn6ka*LBkjEl&e&$6IM?a+hsX+acwsgJ;J;7NdITG`>_upYTWnhQVUYYSq=gb)qEbu zBDS!|Fnyw?Ua4B34?p?;Q1hNiUG%4}QX83JW@;pmcC@R|%8X@pAM8iso~GHjffZb* z*+~O%10^~QUSR_h4_73&ZI$X_lWjTi(O)0nP(^xOhY| zK{UWB`tgo>@jW$DoqAvmH}N4M9!I`LV>bQl4#LjS+the!)PB!hT Jc!Fmb{|A?62H*ey literal 0 HcmV?d00001 diff --git a/out/production/PreCourse-1/PreCourse-1.iml b/out/production/PreCourse-1/PreCourse-1.iml new file mode 100644 index 000000000..b107a2dd8 --- /dev/null +++ b/out/production/PreCourse-1/PreCourse-1.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/out/production/PreCourse-1/README.md b/out/production/PreCourse-1/README.md new file mode 100644 index 000000000..1e1abed69 --- /dev/null +++ b/out/production/PreCourse-1/README.md @@ -0,0 +1,11 @@ +# PreCourse_1 + +# All Instructions are already provided in the respective files. + +Exercise_1 : Implement Stack using Array. + +Exercise_2 : Implement Stack using Linked List. + +Exercise_3 : Implement Singly Linked List. + +*After completing the project kindly submit a pull request* diff --git a/out/production/PreCourse-1/Stack.class b/out/production/PreCourse-1/Stack.class new file mode 100644 index 0000000000000000000000000000000000000000..e5dd555bd74f11e5c02dec5dc1a36f97678e2d0b GIT binary patch literal 1066 zcmZvaeNWR+6vm(1c5Kvcz%~#WBEA4yQ6>sTg_syXvSc`u>Eg>DT1JK9);3*-5Wfr` zfPXZii7|cvzleMaj#z5lGa1qxnui z_8nJ1R8*wUn}n+295jLcZDYqMw+wr;TwC8Zo4!ELqGenD170bX8UZb%p%4AMYzRoN zD!s@emqcE}AcoEm>U$mEZ1bYiC1$jWt)$??RC?8YOJ?-lC3&Tqt!4xD~RJm z#ow|zgj7Sx1!{yZYleHA;C4G(q!ueB!o@CS++YT5YlW*BkQLW7IUKd_biJne$O_K- zR(4IVX?4ukvok>_FwPmII9wUSxQreMTwx^PDp$^!D}n)q5pWF?%$Q`f${fL6(?3H< z`$#AU@&RKRQ(QCLfgH(ss2D;q$c*w)g3f4~j|`!5ue??LskdMBrhe+$v zA;d=}N+CN7h3^Hf8KgPXEXMxg=VCr^9XDd^2P#RtqX%9GlgXX^QofsHanLI#eBs$S0~gX2LGU_2nsB#?9EsUTmZo zH!ZYrDY6lZ&n!lUHfX5uuZ=l2be_YwLo0VNihDG5|HQ^9`#2klgJ);joTZIhCpKzv loAa@a1iNr7e<~TxaG8=TtbR3=iDnq|;LHpKZc{+Q+#hnnrP2TZ literal 0 HcmV?d00001 diff --git a/out/production/PreCourse-1/StackAsLinkedList$StackNode.class b/out/production/PreCourse-1/StackAsLinkedList$StackNode.class new file mode 100644 index 0000000000000000000000000000000000000000..9e48db62b368204d02b2a447ab9b4d394698449a GIT binary patch literal 455 zcmaJ-%Sr=55Ufr%*@tUhYJ3F2gNGys^8tz=kzinnhe+;|&7hO4yRb6}{+0(3Joo{A zl-RR+3&_x~p{kndukVjf0JrD_D531a2~k0n&{&F%7$hQn9Nf>BGB$+jl}eSlCX~Cq znGX-Xiy*`fLPBS1M7+AukxEx`5h-oXi=RohkOXHTj3CgM+f=@=)@k$);gVt9ac{UZAY wzVcK;lXDGa&UH9E`DpP2+P`S*63ZU-=B_WsI5|b+pjavh0O-MD z705r6&*h>mot?$??PsbU3iK{njuqY%NS0tl z?Nh$%@-tEGI-81i*4&0F8|W7p|A<8vIpj5|K_ZqaI&uy}CeG-vDM$SpW-yF%21ZPb zV(bL-+I|qK774q1ByzSIk}I@HC9=5V;gXM{*I@a(2ow(J2$tm?6=I45fgmWT{(H53?rbqMW?FU{`M} zn7Dw8BP(myrPlUZ+sfaN+ctL!RktqfP3c>D-QG-vyB0$Xbzfnb`CGxgmKW|v zWFHIUA`w@m_rJ3fg-R+7pK3{qN)4BubaS2E}Y!8mlzl zaJ?e=wv-bVt)M6dda<6x1N>y*XMGbjfvMw{VL8v;rdo_|JieS2Sr1*Gn*7mO6K%to z!+q&AY!ysZUAMXCmAm!m*g4_2vG1u<%sVBE-)gzDAleYi(za_>sCaQ^#c`CsY|9`} z)F=~4sb8akM*`Db`JG1Fz?Q(|$4%KX;vD&k(rhna2}1V^j=h|-(Qy2Rt3`hGS+uEOxk)y`@osLOT7)jM@%PeBBxtGlL1-Vtxr|LK!69VZ=aAC(MS>CiQ~HTEUr^OYSe6 zEsP&vBKb;hyvFBCbMd4=j^oGK$D}U6AkqMJ9%K=Z;tHub(9_Tc0@&!iUrnG zk`P)G_K-G-D!*Fk!I(tPhv3KY`lBSTGhUgg+~`n!@Fa4E$9JN;)0+R*PVd@Vq_+<7 zMRh)(JwRzbe