From 98c95a1cfe0a199c7c033af75bb3783a1b424654 Mon Sep 17 00:00:00 2001 From: Harshitha Thondalapally Date: Tue, 16 Dec 2025 21:28:28 -0500 Subject: [PATCH] Precourse 1 completed --- .idea/.gitignore | 8 ++ .idea/misc.xml | 6 ++ .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 ++ Exercise_1.java | 41 ++++++--- Exercise_2.java | 52 ------------ Exercise_3.java => LinkedList.java | 44 ++++++---- PreCourse-1.iml | 11 +++ StackAsLinkedList.java | 75 ++++++++++++++++ out/production/PreCourse-1/.idea/.gitignore | 8 ++ 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 -> 435 bytes out/production/PreCourse-1/LinkedList.class | Bin 0 -> 1626 bytes out/production/PreCourse-1/Main.class | Bin 0 -> 1159 bytes out/production/PreCourse-1/PreCourse-1.iml | 11 +++ out/production/PreCourse-1/README.md | 11 +++ out/production/PreCourse-1/Stack.class | Bin 0 -> 1045 bytes .../StackAsLinkedList$StackNode.class | Bin 0 -> 474 bytes .../PreCourse-1/StackAsLinkedList.class | Bin 0 -> 1861 bytes 30 files changed, 616 insertions(+), 79 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 rename Exercise_3.java => LinkedList.java (62%) 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..13566b81b --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 000000000..2bfdeda2a --- /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..295512d69 100644 --- a/Exercise_1.java +++ b/Exercise_1.java @@ -7,29 +7,49 @@ class Stack { boolean isEmpty() { - //Write your code here + return top < 0; } Stack() { - //Initialize your constructor + this.top = -1; } boolean push(int x) { - //Check for stack Overflow - //Write your code here + if (top >= MAX-1) + { + System.out.println("Stack Overflow"); + return false; + } + else + { + a[++top] = x; + return true; + } } int pop() { - //If empty return 0 and print " Stack Underflow" - //Write your code here + if (isEmpty()) + { + System.out.println("Stack Underflow"); + return -1; + } + else + { + return a[top--]; + } } int peek() - { - //Write your code here + { + if (isEmpty()) { + System.out.println("Stack Underflow"); + return 0; + } else { + return a[top]; + } } } @@ -40,7 +60,8 @@ public static void main(String args[]) Stack s = new Stack(); s.push(10); s.push(20); - s.push(30); - System.out.println(s.pop() + " Popped from stack"); + s.push(30); + System.out.println(s.pop() + " Popped from stack"); + System.out.println("Top element is " + s.peek()); } } 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/LinkedList.java similarity index 62% rename from Exercise_3.java rename to LinkedList.java index fb66d329d..bd64a5041 100644 --- a/Exercise_3.java +++ b/LinkedList.java @@ -1,6 +1,4 @@ -import java.io.*; - -// Java program to implement +// Java program to implement // a Singly Linked List public class LinkedList { @@ -17,25 +15,31 @@ static class Node { // Constructor Node(int d) { - //Write your code here + this .data = d; + this.next = null; } } // 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 - - } + Node newNode = new Node(data); + + if(list.head == null) + list.head = newNode; + else + { + Node temp = list.head; + while (temp.next != null) + { + temp = temp.next; + } + temp.next = newNode; + } + + return list; + } // Method to print the LinkedList. public static void printList(LinkedList list) @@ -44,7 +48,13 @@ public static void printList(LinkedList list) // Print the data at current node - // Go to next node + // Go to next node + Node temp = list.head; + while(temp != null) + { + System.out.print(temp.data + " "); + temp = temp.next; + } } // Driver code 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..2ed34ee5e --- /dev/null +++ b/StackAsLinkedList.java @@ -0,0 +1,75 @@ +public class StackAsLinkedList { + // Time: push/pop/peek/isEmpty are all O(1). + // Space: O(n) for n nodes. + + StackNode root; + + static class StackNode { + int data; + StackNode next; + + StackNode(int data) + { + this.data = data; + this.next = null; + } + } + + + public boolean isEmpty() + { + return root == null; + } + + public void push(int data) + { + // Create a new node + StackNode newNode = new StackNode(data); + // New node points to current top + newNode.next = root; + // New node becomes the new top + root = newNode; + } + + public int pop() + { + + if (isEmpty()) + { + System.out.println("Stack Underflow"); + return 0; + } + else + { + int popData = root.data; + root = root.next; + return popData; + } + } + + public int peek() + { + if (isEmpty()) + { + System.out.println("Stack Underflow"); + return 0; + } + else + return root.data; + } + + //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..13566b81b --- /dev/null +++ b/out/production/PreCourse-1/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.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..2bfdeda2a --- /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..381e274d5 --- /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..1eb3de9b9 --- /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..f34d89ac1 --- /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..136e9ac30b224c18192a96b84e6de6ca344ed79a GIT binary patch literal 435 zcmZ8dO;5r=5Pb`UmRk9!iVA8xcmNLa12kTUMv?{&8tx0-XtB0QyBPnL2V&yEAK;HN zzO5!2vza%$GjHC^?8oQZJAg|ZxhSD*!}3r;RiL?)PjVQ`TxGX%9#hW`(uIs?GKD3qvJr5q((17STtIkvg_{fcAG8b_!7=-ewzqE_RFBJ?t00g9Cb(83!F4!ubMu CVoYxU 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..94674bb237315fa664b4ee013e96488f65dc344d GIT binary patch literal 1626 zcmaJ?+fEx-6kW$2GuVuQn1&E;CB#Xw9pa|x-D#SJmf&>kq$Q$?`gE|5V1hkk%^cFA z{z(6T$6iEBlt_I{rG802pidQQy3UL%j6i+xKDWKsUVH6x#((_t{5Jrf;maISNZYU+ zWH2N!{zN{N)sFPHst-1wsFoHOy5;$vzAcbmDs9*p78r9qe@C@lFVe+k&{jFv$QghU z0c)vV+Q=f0Q5$0p#&J#{ckEAxZ6(_R=iKAX7^IdZ%7la0OoZjDZ*>-vxL{+-!9`4; zptimjY1Jj8V3!2XyD@1ms6GrmU$5&>$!-ic>tGJ^glkJJ1w_5Tq8A)o!lJ;1uG~>8 zf!~t)D^G887HR40h=8mi!Hk6>hk8A$~)Jww4joCYXuflY>5Xi>(MtQd3L`-Reb*``*Nq})dExqlrT4yj9F{o^hLnqE*`|2ChVuAd+maUzJ?EM$rm7Xs! zx%Bl}l@dUPTST8Y^7 z(J($0NQs59A*|+b4{J8+rm6P@ipTfY^PdJgs+x2!>GP^==^)$__nBi?@vW zHktxgPL*~RV;c_z=KtT7_bw@qn&tWa0l^=iDy_vizXY^zaaHAL&NAggh@Ut~;U=v) z2GV$&)=3=j4&LP|Ywk67Oz;o%usGg)0sHaHA+n9~0i544Qoi;JoPEriWpnueg_jsH zLv#PtU&}lzlz(JcI!?8SVa{g=JV%D}m?GynEb=WDnd&NTpcK<6Gu0eF9`CV=v`LEh zV?t)eZvZJ}QN{;6P2oeH7hoM>%7%Rei+1#H#%IkN>yy{?Gs;{tB;CqOO#h7Yl>^K? z$LqkaxXgLM-GB9`Q6-@|N#Q^;8ETOwkttGGU^1i9WCGSFmBDOGRK!%WNF5(#5 z)}#~<26$EQ5pI*^FfPXodF}8q*D2h=CmhYCuyHr`5d7B=SRsxPF~$8nTt+sC_ysQh E3)Y)q-2eap 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..ed2c00bcadc99908cac6067f59a9edff3c8bccf3 GIT binary patch literal 1159 zcmaJ>>rN9<5dID=-BMRt%T2u0s-P`ZD&DbNq!l7bQIZmf`okQyN4j*oXR~`sLr5cI;EIVX zM$W-D4g)1RgeJQLK2{F{+OoXq+pcOTU+_*vqmG#v#{}7V(hFm+XDQ=J6W4H^VWPv^ zq9$F7s~ual=oBdKs(=tFd;}W4f)H(Yj}UJnXW*8JJZ>|L^ohz~csd8i)gTukirYG^ zyC$Y|T5(T^b`}hi2JVx%!EN%3*JM*Lr0cdT-gP^>!r$V%4r#J=X>n(p`?i)(m2uUw zDdR+4J6FiN6M~EvKJ|-E_uStj`;k7^42*7!de|9)N;PEHx5S#QgQr)&3g5B=@p*1m zKb-nel~M)D=iY`;E!hl`ctOA{zbQRWH1l74*~wEyt#%UgWWFW6yl_NExGHZ4d6rIq zO1gkW153Ii%M4RzlViIFvMtI{>7ypCaZ5@6kl}l8Wls&G9Nu!b>4;#eE@ivxRW6pG zM{~|`>(CQ@%zLX8&2pu8Fis(A+;JMV5>zvD-F1aub9fMlz(AE@`of#~rE1^}L+<~k zy366aX#Vce%IQy2S~{Ac0-eglnbyo4gZ&7vi$wJ`Fpn9cW@La89*{JIhnOXecK$|S z8gAhij1R{cs+TgUBcygpnbC;lH2aC+(h){aa1}VhjYzz6g6U8^i&N^O~Zrpn__c%Xk!z(tbp?Nj$|I9#b|kJRy02GX=U&qMl>Fn|=vE2z=W GXYwD@JQJh< 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..4b0e7d33250aee51abc042005b91f1e81218455d GIT binary patch literal 1045 zcmZva!A=uV6o&shGjz%@1=>PEi;5Mbtx7@E4aTShlP1NQR2!`e9m)uU?MySBB0P$T z8&_`FXao~ud;niWp2GOwX{CrRdgtDA&-uUepW7e5zJ3R=id%zFpz6>}3?L#fPzkL1 zYXLRzS^}bIAc{d9hKV7V0;Aj3j#X$_?q;F9zHQe7fyiygb%HxA$>yq3ZP>&JMp9mQ9$S~JwuQpr3Ug)6~ z#f-p67x~29=rVb=cJHY`Y{hfif#n8OtI@GlKs^%BR=f?HH6_QjA9kASw*S~#Z!nT5 zd3CE%wR}gOdqFMOa@vHJLc}sP!_Au2`jgP=w7005E#_(*<1X1P`5GK>k>QqY^MQ7|3%qyNS4ht2|xfZve{BU75hY3NNKzkxUs$=D$GC z$JL{6#sS5Z1Bj0dE1_xv8u!CoBZ#rB1RLuUl05=2k3vs2V6MWNIoW1h{rMiTPlzWb z4sk}^XDpU~#tZFbjhu8@>l;Y1Nnnf?Qp8Mfm*#w?LR_jVd5oLGLTFf8Qz6FqS;X~T z2Ns2-u}uCD7v6U9mxx#T_?oss{CpqY^_hW=8M>TBobLNRGbbiVT%6)d$GBQ=j_Fgl co?Dvzhf^SDft*EhmQHZer#S*Q$Wn0gH^rHwumAu6 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..6b532f776f108567783bdf72d3cb820fc947beaf GIT binary patch literal 474 zcmaJ;O-}+b5PgM({cvGnRTPoLg9qRsKR{z*h(?kP95CF=(r97bO}54Ow>%IN5B>mu zlySOxBQZ_iv~S+L$+TbJAD;kj(e+S5*@oq#f+|B}#b5X^;pyXWx>$)=GgPl+D)lu( zx!0e&aNyeTeC)wz=*%>a*EcGX=~^r!sq}flOtPh5u$EkN1~xWTbsqs5M5f}ET)WXf zrI#e@jr(&7qrxem24b>#UWojGFB0+&qb%mhoafTq|42(eNyXsJvP~X~J86Wiojw<4 zMh0ghl)lfDwsFGH+>tT(<1`idDB(&8vULlI84YJNP>CMUYGsa8aif;DDIcZy62?Q)6!0&>v97)E?ouh;4Kz LdX#a{#wna1fm2+T literal 0 HcmV?d00001 diff --git a/out/production/PreCourse-1/StackAsLinkedList.class b/out/production/PreCourse-1/StackAsLinkedList.class new file mode 100644 index 0000000000000000000000000000000000000000..2c67d318f4d7fb2159a574d6e47a2da27385d094 GIT binary patch literal 1861 zcmaJ?+fv(B6kW$Q$Tl(;bBm!NPD>JFNZbp}rKY(+AaQC)S`!kI_CeSupjehPk_hDk z`VZ|F^d&FtBrro}`r4U(RHy4mp4zEt9(*oad+)W^+UFeq_4mmi09Nrs8ZpE*By{wl zUtsv9@yaM!hP_*Qxbsrh1A+b}(>8;f0`bD!Rtia^G^BM5Ko=OP1xCGj$FG`pQ#Pum zPydAHIGoN_d%n$vmJO#N%Nhm+ra$13Mh3&Gs1ar?R1|UsqdLYEY{Hg525FWup<@zf z1T@oMZMnf=Smd)5rZBDHBOPZk^B$+#p&!T=y_|iPI9?6enojAFXWBt6@TAcyCy^Hz z3QNmBwj0uWVL1nBe2h;t%<8y+ivpvk1hNWOrLk;gE<~wAA(_{-cgqolf{r;9Nugl` zhJdIj8gVsT)^R0d>+bt|%J8X<&+s{mbsaY(R>`twi#oolOBcgxNy5vESN}-lnl*(UPq?b;H^+JX7u4 z#ze4Z5@NKsxn+S&DB8N=ww*Ow9;j|BWgPczNI20lObRqnc-~v$+!o6*yj=xw%4cfe zTb4k&=IncQxn`;=Cqm5b6L>}SMqpq=`oX$XgqUx5nTOI3Ji}d=!JgCblUOH;$g?n4 zHu5h#rAvZ>d1=X(w1d3q=fzMzzD?sh)HH0W20Rv+?OYYpe&sY}DQa}o zlQp9rI35q=&)r9%?HJW?->@5&^k=J%)7*EXW+9_5H z%c_}yWWV%^ZA)*(GJIcBqf{uRYM6#?feStSPAgl(bAg!;yYdZ*IO04HVT^}Z@W%&) zV?Wn?c{rB2D{)re`ijR8zi|=6Qrk%dea*EVIp8L4amRarGaOa$GG`T>DZYXBC$z+` zNW@>$5bsJd-jyWNPI8+*eTWU*R`I-p992GpfpN~0?~vJ^KE}}cg3A0B+2X=mXr1!1 zNYHH>DZV!&IEM-3LzH|J-bP^}b@iD%g+bgQkr>y!;cd7B?v*wdi$@s$1)1NG%bq*J z`S@#v`UaPliqRrV@aYb(DXIrPOBya=2nANKfE+GkmQ<8r6U>_9#Jx(~YsCGkOWWLkQBqjJ-8RZkZK^lkA-R2w`Re>|`Ung2 z!(-t%!;$Rgk5D?n7XU?ww%1OGp|&0EXNV7~nPmDw0*vubZ3_3ObOqP(;9mtmlB-yw xZ<3nd