diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index f3395e053..000000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 600d2d33b..000000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.vscode \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..73f69e095 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/The-Complete-FAANG-Preparation.iml b/.idea/The-Complete-FAANG-Preparation.iml new file mode 100644 index 000000000..0c8867d7e --- /dev/null +++ b/.idea/The-Complete-FAANG-Preparation.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..7b2d357a6 --- /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..94a25f7f4 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/01]. Array/C++/_45)_sum_of_three_element_is_K.cpp b/1]. DSA/1]. Data Structures/01]. Array/C++/_45)_sum_of_three_element_is_K.cpp new file mode 100644 index 000000000..0bed9638a --- /dev/null +++ b/1]. DSA/1]. Data Structures/01]. Array/C++/_45)_sum_of_three_element_is_K.cpp @@ -0,0 +1,49 @@ +/* An array of n elements, find three elements in the array, such that, their sum is equal to the +given element K of that array.*/ + +#include +using namespace std; + +bool Triplet(int arr[], int arr_size, int sum) +{ + int l, r,m; //for left ,right and middle + sort(arr, arr + arr_size); + for (int i = 0; i < arr_size - 2; i++) { + l=0; + r = arr_size - 1; + m=(l+r)/2; + while (l < r) { + if (arr[l] +arr[m]+ arr[r] == sum) { + cout<<"Triplet is: "<>n; + int array[n]; + cout << "Enter the elements:"; + for(int i=0;i>array[i]; + } + cout<<"Enter the sum:"; + cin>>k; + + for(int i=0;i + + + + +| S.No. | Topic: | Problem | Solutions | Python | C++ | Java | JavaScript | +| ------- |:---------------------:|------------------------------------------------------------------------------------------------------|:---------:|--------|--------|--------|--------| +| 1 | `Array` | Search Element |✔️ | | | | | +| 2 | `Array` | Insert Element |✔️ | | | | | +| 3 | `Array` | Delete Element |✔️ | | | | | +| 4 | `Array` | Reverse Array |✔️ | | | | | +| 5 | `Array` | Left Rotate Array by 1 |✔️ | | | | | +| 6 | `Array` | Left Rotate Array by d |✔️ | |

| |

| +| 7 | `Array` | Remove Duplicates from a Sorted Array |✔️ | |
| |
| +| 8 | `Array` | Largest Number |✔️ | |
| |
| +| 9 | `Array` | Second Largest Number |✔️ | |
| |
| +| 10 | `Array` | Move All ZEROs to End |✔️ | |
| |
| +| 11 | `Array` | Leaders in an Array |✔️ | |
| |
| +| 12 | `Array` | Maximum Difference |✔️ | |
| |
| +| 13 | `Array` | Stock Buy & Shell |✔️ | |
| |
| +| 14 | `Array` | Trapping_Rain_Water |✔️ | |
| | | +| 15 | `Array` | Next Permutation |✔️ | |
| | | +| 16 | `Array` | Count Inversion |✔️ | |
| | | +| 17 | `Array` | Best time to buy and Sell stock |✔️ | |
| | | +| 18 | `Array` | Maximum Consecutive ONEs in binary Array |✔️ | |
| | | +| 19 | `Array` | Maximum Circular Subarray Sum |✔️ | |
| | | +| 20 | `Array` | Maximum Length Even Odd Subarray |✔️ | |
| || +| 21 | `Array` | Majority Element |✔️ | |
| | | +| 22 | `Array` | Minimum Group flips to make same |✔️ | | | | | +| 23 | `Array` | Max Sum of K Consecutive Element |✔️ | |
| | | +| 24 | `Array` | Find SubArray of Given Sum |✔️ | |
| | | +| 25 | `Array` | Print N bonacci Numbers |✔️ | | | | | +| 26 | `Array` | Get_Sum on Given Queries |✔️ | | | | | +| 27 | `Array` | Find Equilibrium Point in an Array |✔️ | |
| | | +| 28 | `Array` | In Two Array Find Max Occuring Element |✔️ | | | | | + +
+
+ ⬆️ Back to Top +
+
+ diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/C++/_01)_Insert_At_Beginning_Of_LinkedList.cpp b/1]. DSA/1]. Data Structures/06]. Linked List/C++/_01)_Insert_At_Beginning_Of_LinkedList.cpp new file mode 100644 index 000000000..75ec0c253 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/C++/_01)_Insert_At_Beginning_Of_LinkedList.cpp @@ -0,0 +1,35 @@ +#include +using namespace std; + +struct Node{ + int data; + Node* next; + Node(int x){ + data=x; + next=NULL; + } +}; + +Node *insertBegin(Node *head,int x){ + Node *temp=new Node(x); + temp->next=head; + return temp; + +} + +void printlist(Node *head){ + Node *curr=head; + while(curr!=NULL){ + cout<data<<" "; + curr=curr->next; + } +} +int main() +{ + Node *head=NULL; + head=insertBegin(head,30); + head=insertBegin(head,20); + head=insertBegin(head,10); + printlist(head); + return 0; +} diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/C++/_02)_Insert_At_End_Of_LinkedList.cpp b/1]. DSA/1]. Data Structures/06]. Linked List/C++/_02)_Insert_At_End_Of_LinkedList.cpp new file mode 100644 index 000000000..be3f16262 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/C++/_02)_Insert_At_End_Of_LinkedList.cpp @@ -0,0 +1,40 @@ +#include +using namespace std; + +struct Node{ + int data; + Node* next; + Node(int x){ + data=x; + next=NULL; + } +}; + +Node *insertEnd(Node *head,int x){ + Node *temp=new Node(x); + if(head==NULL)return temp; + Node *curr=head; + while(curr->next!=NULL){ + curr=curr->next; + } + curr->next=temp; + return head; + +} + +void printlist(Node *head){ + Node *curr=head; + while(curr!=NULL){ + cout<data<<" "; + curr=curr->next; + } +} +int main() +{ + Node *head=NULL; + head=insertEnd(head,10); + head=insertEnd(head,20); + head=insertEnd(head,30); + printlist(head); + return 0; +} diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/C++/_05)_Insert_At_A_Given_Position_Of_LinkedLIst.cpp b/1]. DSA/1]. Data Structures/06]. Linked List/C++/_05)_Insert_At_A_Given_Position_Of_LinkedLIst.cpp new file mode 100644 index 000000000..b61834eb6 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/C++/_05)_Insert_At_A_Given_Position_Of_LinkedLIst.cpp @@ -0,0 +1,102 @@ +#include +using namespace std; + +// A linked list Node +struct Node { + int data; + struct Node* next; +}; + +// Size of linked list +int size = 0; + +// function to create and return a Node +Node* getNode(int data) +{ + // allocating space + Node* newNode = new Node(); + + // inserting the required data + newNode->data = data; + newNode->next = NULL; + return newNode; +} + +// function to insert a Node at required position +void insertPos(Node** current, int pos, int data) +{ + // This condition to check whether the + // position given is valid or not. + if (pos < 1 || pos > size + 1) + cout << "Invalid position!" << endl; + else { + + // Keep looping until the pos is zero + while (pos--) { + + if (pos == 0) { + + // adding Node at required position + Node* temp = getNode(data); + + // Making the new Node to point to + // the old Node at the same position + temp->next = *current; + + // Changing the pointer of the Node previous + // to the old Node to point to the new Node + *current = temp; + } + else + // Assign double pointer variable to point to the + // pointer pointing to the address of next Node + current = &(*current)->next; + } + size++; + } +} + + +void printList(struct Node* head) +{ + while (head != NULL) { + cout << " " << head->data; + head = head->next; + } + cout << endl; +} + +// Driver Code +int main() +{ + // Creating the list 3->5->8->10 + Node* head = NULL; + head = getNode(3); + head->next = getNode(5); + head->next->next = getNode(8); + head->next->next->next = getNode(10); + + size = 4; + + cout << "Linked list before insertion: "; + printList(head); + + int data = 12, pos = 3; + insertPos(&head, pos, data); + cout << "Linked list after insertion of 12 at position 3: "; + printList(head); + + + data = 1, pos = 1; + insertPos(&head, pos, data); + cout << "Linked list after insertion of 1 at position 1: "; + printList(head); + + + data = 15, pos = 7; + insertPos(&head, pos, data); + cout << "Linked list after insertion of 15 at position 7: "; + printList(head); + + return 0; +} diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_01)_Insert_At_Beginning _Of_LinkedList.java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_01)_Insert_At_Beginning _Of_LinkedList.java new file mode 100644 index 000000000..5899312d5 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_01)_Insert_At_Beginning _Of_LinkedList.java @@ -0,0 +1,40 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + + static Node insertBegin(Node head, int x){ + Node temp=new Node(x); + temp.next=head; + return temp; + } + + public static void main(String args[]) + { + Node head=null; + head=insertBegin(head,30); + head=insertBegin(head,20); + head=insertBegin(head,10); + printlist(head); + + } + + public static void printlist(Node head){ + Node curr=head; + while(curr!=null){ + System.out.print(curr.data+" "); + curr=curr.next; + } + } +} diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_02)_Insert_At_End_End_Of_LinkedLIst.java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_02)_Insert_At_End_End_Of_LinkedLIst.java new file mode 100644 index 000000000..4d279eac1 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_02)_Insert_At_End_End_Of_LinkedLIst.java @@ -0,0 +1,45 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + + static Node insertEnd(Node head, int x){ + Node temp=new Node(x); + if(head==null)return temp; + Node curr=head; + while(curr.next!=null){ + curr=curr.next; + } + curr.next=temp; + return head; + } + + public static void main(String args[]) + { + Node head=null; + head=insertEnd(head,10); + head=insertEnd(head,20); + head=insertEnd(head,30); + printlist(head); + + } + + public static void printlist(Node head){ + Node curr=head; + while(curr!=null){ + System.out.print(curr.data+" "); + curr=curr.next; + } + } +} \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_03)_Delete_From_Beginning_Of_LinkedList.java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_03)_Delete_From_Beginning_Of_LinkedList.java new file mode 100644 index 000000000..da6e71ebf --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_03)_Delete_From_Beginning_Of_LinkedList.java @@ -0,0 +1,40 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + public static void main(String args[]) + { + Node head=new Node(10); + head.next=new Node(20); + head.next.next=new Node(30); + printlist(head); + head=delHead(head); + printlist(head); + + } + + static Node delHead(Node head){ + if(head==null)return null; + else{ + return head.next; + } + } + public static void printlist(Node head){ + Node curr=head; + while(curr!=null){ + System.out.print(curr.data+" "); + curr=curr.next; + }System.out.println(); + } +} \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_04)_Delete_From_End_Of_LinkedList.java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_04)_Delete_From_End_Of_LinkedList.java new file mode 100644 index 000000000..dac743178 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_04)_Delete_From_End_Of_LinkedList.java @@ -0,0 +1,43 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + public static void main(String args[]) + { + Node head=new Node(10); + head.next=new Node(20); + head.next.next=new Node(30); + printlist(head); + head=delTail(head); + printlist(head); + + } + + static Node delTail(Node head){ + if(head==null)return null; + if(head.next==null)return null; + Node curr=head; + while(curr.next.next!=null) + curr=curr.next; + curr.next=null; + return head; + } + public static void printlist(Node head){ + Node curr=head; + while(curr!=null){ + System.out.print(curr.data+" "); + curr=curr.next; + }System.out.println(); + } +} \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_05)_Insert_At_A_Given_Position_In_LinkedList.java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_05)_Insert_At_A_Given_Position_In_LinkedList.java new file mode 100644 index 000000000..88e69f190 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_05)_Insert_At_A_Given_Position_In_LinkedList.java @@ -0,0 +1,94 @@ +class LinkedLIst { + // A linked list Node + static class Node { + public int data; + public Node nextNode; + + // inserting the required data + public Node(int data) { + this.data = data; + + } + } + + // function to create and return a Node + static Node GetNode(int data) { + return new Node(data); + } + + // function to insert a Node at required position + static Node InsertPos(Node headNode, int position, int data) { + Node head = headNode; + if (position < 1) + System.out.print("Invalid position"); + + // if position is 1 then new node is + // set infornt of head node + // head node is changing. + if (position == 1) { + Node newNode = new Node(data); + newNode.nextNode = headNode; + head = newNode; + } else { + while (position-- != 0) { + if (position == 1) { + // adding Node at required position + Node newNode = GetNode(data); + + // Making the new Node to point to + // the old Node at the same position + newNode.nextNode = headNode.nextNode; + + // Replacing current with new Node + // to the old Node to point to the new Node + headNode.nextNode = newNode; + break; + } + headNode = headNode.nextNode; + } + if (position != 1) + System.out.print("Position out of range"); + } + return head; + } + + static void PrintList(Node node) { + while (node != null) { + System.out.print(node.data); + node = node.nextNode; + if (node != null) + System.out.print(","); + } + System.out.println(); + } + + // Driver code + public static void main(String[] args) { + Node head = GetNode(3); + head.nextNode = GetNode(5); + head.nextNode.nextNode = GetNode(8); + head.nextNode.nextNode.nextNode = GetNode(10); + + System.out.print("Linked list before insertion: "); + PrintList(head); + + int data = 12, pos = 3; + head = InsertPos(head, pos, data); + System.out.print("Linked list after" + " insertion of 12 at position 3: "); + PrintList(head); + + // front of the linked list + data = 1; + pos = 1; + head = InsertPos(head, pos, data); + System.out.print("Linked list after" + "insertion of 1 at position 1: "); + PrintList(head); + + // insetion at end of the linked list + data = 15; + pos = 7; + head = InsertPos(head, pos, data); + System.out.print("Linked list after" + " insertion of 15 at position 7: "); + PrintList(head); + } +} diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_06)i)_Search_In_LinkedList_(Iterative).java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_06)i)_Search_In_LinkedList_(Iterative).java new file mode 100644 index 000000000..a971fbe88 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_06)i)_Search_In_LinkedList_(Iterative).java @@ -0,0 +1,46 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + public static void main(String args[]) + { + Node head=new Node(10); + head.next=new Node(20); + head.next.next=new Node(30); + printlist(head); + System.out.println("Position of element in Linked List: "+search(head,20)); + + } + + static int search(Node head, int x){ + int pos=1; + Node curr=head; + while(curr!=null){ + if(curr.data==x) + return pos; + else{ + pos++; + curr=curr.next; + } + } + return -1; + } + public static void printlist(Node head){ + Node curr=head; + while(curr!=null){ + System.out.print(curr.data+" "); + curr=curr.next; + }System.out.println(); + } +} \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_06)ii)_Search_In_LinkedList_(Recursive).java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_06)ii)_Search_In_LinkedList_(Recursive).java new file mode 100644 index 000000000..51fc67126 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_06)ii)_Search_In_LinkedList_(Recursive).java @@ -0,0 +1,42 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + public static void main(String args[]) + { + Node head=new Node(10); + head.next=new Node(20); + head.next.next=new Node(30); + printlist(head); + System.out.println("Position of element in Linked List: "+search(head,20)); + + } + + static int search(Node head, int x){ + if(head==null)return -1; + if(head.data==x)return 1; + else{ + int res=search(head.next,x); + if(res==-1)return -1; + else return res+1; + } + } + public static void printlist(Node head){ + Node curr=head; + while(curr!=null){ + System.out.print(curr.data+" "); + curr=curr.next; + }System.out.println(); + } +} \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_07)_Middle_Of_LinkedList.java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_07)_Middle_Of_LinkedList.java new file mode 100644 index 000000000..4722cb2d2 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_07)_Middle_Of_LinkedList.java @@ -0,0 +1,46 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + public static void main(String args[]) + { + Node head=new Node(10); + head.next=new Node(20); + head.next.next=new Node(30); + head.next.next.next=new Node(40); + head.next.next.next.next=new Node(50); + printlist(head); + System.out.print("Position of element in Linked List: "); + printMiddle(head); + + } + + static void printMiddle(Node head){ + if(head==null)return; + Node slow=head,fast=head; + while(fast!=null&&fast.next!=null){ + slow=slow.next; + fast=fast.next.next; + } + System.out.print(slow.data); + } + + public static void printlist(Node head){ + Node curr=head; + while(curr!=null){ + System.out.print(curr.data+" "); + curr=curr.next; + }System.out.println(); + } +} \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_08)i)_Nth_Node_From_End_Of_LinkedList_(Using length of Linked List).java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_08)i)_Nth_Node_From_End_Of_LinkedList_(Using length of Linked List).java new file mode 100644 index 000000000..737090f29 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_08)i)_Nth_Node_From_End_Of_LinkedList_(Using length of Linked List).java @@ -0,0 +1,48 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + public static void main(String args[]) + { + Node head=new Node(10); + head.next=new Node(20); + head.next.next=new Node(30); + head.next.next.next=new Node(40); + head.next.next.next.next=new Node(50); + printlist(head); + System.out.print("Nth node from end of Linked List: "); + printNthFromEnd(head,2); + + } + + static void printNthFromEnd(Node head,int n){ + int len=0; + for(Node curr=head;curr!=null;curr=curr.next) + len++; + if(len s=new HashSet(); + for(Node curr=head;curr!=null;curr=curr.next) { + if (s.contains(curr)) + return true; + s.add(curr); + } + return false; + } + + public static void printlist(Node head){ + Node curr=head; + while(curr!=null){ + System.out.print(curr.data+" "); + curr=curr.next; + }System.out.println(); + } +} \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_13)_Detect_And_Remove_Loop_In_LinkedList.java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_13)_Detect_And_Remove_Loop_In_LinkedList.java new file mode 100644 index 000000000..7d3461741 --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_13)_Detect_And_Remove_Loop_In_LinkedList.java @@ -0,0 +1,53 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + public static void main(String args[]) + { + Node head=new Node(15); + head.next=new Node(10); + head.next.next=new Node(12); + head.next.next.next=new Node(20); + head.next.next.next.next=head.next; + detectRemoveLoop(head); + } + + static void detectRemoveLoop(Node head) + { Node slow= head,fast = head; + + while (fast!=null && fast.next!=null) { + slow = slow.next; + fast = fast.next.next; + if (slow == fast) { + break; + } + } + if(slow!=fast) + return; + slow=head; + while(slow.next!=fast.next){ + slow=slow.next; + fast=fast.next; + } + fast.next=null; + } + + public static void printlist(Node head){ + Node curr=head; + while(curr!=null){ + System.out.print(curr.data+" "); + curr=curr.next; + }System.out.println(); + } +} \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_14)_Delete_Node_With_Given_Pointer_In_LinkedList.java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_14)_Delete_Node_With_Given_Pointer_In_LinkedList.java new file mode 100644 index 000000000..fdd7e900f --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_14)_Delete_Node_With_Given_Pointer_In_LinkedList.java @@ -0,0 +1,42 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + public static void main(String args[]) + { + Node head=new Node(10); + head.next=new Node(20); + Node ptr=new Node(30); + head.next.next=ptr; + head.next.next.next=new Node(40); + head.next.next.next.next=new Node(25); + printlist(head); + deleteNode(ptr); + printlist(head); + } + + static void deleteNode(Node ptr){ + Node temp=ptr.next; + ptr.data=temp.data; + ptr.next=temp.next; + } + + public static void printlist(Node head){ + Node curr=head; + while(curr!=null){ + System.out.print(curr.data+" "); + curr=curr.next; + }System.out.println(); + } +} \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_15)i)_Intersection_Point_Of_2_LinkedLists_(Using Hashing).java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_15)i)_Intersection_Point_Of_2_LinkedLists_(Using Hashing).java new file mode 100644 index 000000000..2d2fae63d --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_15)i)_Intersection_Point_Of_2_LinkedLists_(Using Hashing).java @@ -0,0 +1,67 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + public static void main(String args[]) + { + /* + Creation of two linked lists + + 1st 3->6->9->15->30 + 2nd 10->15->30 + + 15 is the intersection point + */ + + Node newNode; + + Node head1 = new Node(10); + + Node head2 = new Node(3); + + newNode = new Node(6); + head2.next = newNode; + + newNode = new Node(9); + head2.next.next = newNode; + + newNode = new Node(15); + head1.next = newNode; + head2.next.next.next = newNode; + + newNode = new Node(30); + head1.next.next = newNode; + + head1.next.next.next = null; + + System.out.print(getIntersection(head1, head2)); + } + + static int getIntersection(Node head1, Node head2) + { + HashSet s=new HashSet<>(); + Node curr=head1; + while(curr!=null){ + s.add(curr); + curr=curr.next; + } + curr=head2; + while(curr!=null){ + if(s.contains(curr)) + return curr.data; + curr=curr.next; + } + return -1; + } +} \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_15)ii)_Intersection_Point_Of_2_LinkedLists_(Using Difference of Lengths).java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_15)ii)_Intersection_Point_Of_2_LinkedLists_(Using Difference of Lengths).java new file mode 100644 index 000000000..67b53f23f --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_15)ii)_Intersection_Point_Of_2_LinkedLists_(Using Difference of Lengths).java @@ -0,0 +1,89 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class LinkedList { + + static Node head1, head2; + + static class Node { + + int data; + Node next; + + Node(int d) + { + data = d; + next = null; + } + } + + int getNode() + { + int c1 = getCount(head1); + int c2 = getCount(head2); + int d; + + if (c1 > c2) { + d = c1 - c2; + return _getIntesectionNode(d, head1, head2); + } + else { + d = c2 - c1; + return _getIntesectionNode(d, head2, head1); + } + } + + int _getIntesectionNode(int d, Node node1, Node node2) + { + int i; + Node current1 = node1; + Node current2 = node2; + for (i = 0; i < d; i++) { + if (current1 == null) { + return -1; + } + current1 = current1.next; + } + while (current1 != null && current2 != null) { + if (current1.data == current2.data) { + return current1.data; + } + current1 = current1.next; + current2 = current2.next; + } + + return -1; + } + + int getCount(Node node) + { + Node current = node; + int count = 0; + + while (current != null) { + count++; + current = current.next; + } + + return count; + } + + public static void main(String[] args) + { + LinkedList list = new LinkedList(); + + list.head1 = new Node(3); + list.head1.next = new Node(6); + list.head1.next.next = new Node(9); + list.head1.next.next.next = new Node(15); + list.head1.next.next.next.next = new Node(30); + + list.head2 = new Node(10); + list.head2.next = new Node(15); + list.head2.next.next = new Node(30); + + System.out.println(list.getNode()); + } +} + diff --git a/1]. DSA/1]. Data Structures/06]. Linked List/Java/_16)_Merge_2_LinkedLists.java b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_16)_Merge_2_LinkedLists.java new file mode 100644 index 000000000..11f434bec --- /dev/null +++ b/1]. DSA/1]. Data Structures/06]. Linked List/Java/_16)_Merge_2_LinkedLists.java @@ -0,0 +1,59 @@ +import java.util.*; +import java.io.*; +import java.lang.*; + +class Node{ + int data; + Node next; + Node(int x){ + data=x; + next=null; + } + } + +class Test { + + public static void main(String args[]) + { + Node a=new Node(10); + a.next=new Node(20); + a.next.next=new Node(30); + Node b=new Node(5); + b.next=new Node(35); + printlist(sortedMerge(a,b)); + + } + + static Node sortedMerge(Node a,Node b){ + if(a==null)return b; + if(b==null)return a; + Node head=null,tail=null; + if(a.data<=b.data){ + head=tail=a;a=a.next; + } + else{ + head=tail=b;b=b.next; + } + while(a!=null&&b!=null){ + if(a.data<=b.data){ + tail.next=a;tail=a;a=a.next; + } + else{ + tail.next=b;tail=b;b=b.next; + } + } + if(a==null){tail.next=b;} + else{ + tail.next=a; + } + return head; + } + + public static void printlist(Node head){ + Node curr=head; + while(curr!=null){ + System.out.print(curr.data+" "); + curr=curr.next; + }System.out.println(); + } +} \ No newline at end of file diff --git a/1]. DSA/1]. Data Structures/09]. Stack/C++/_02)_paranthesis.cpp b/1]. DSA/1]. Data Structures/09]. Stack/C++/_02)_paranthesis.cpp new file mode 100644 index 000000000..4bdc976a7 --- /dev/null +++ b/1]. DSA/1]. Data Structures/09]. Stack/C++/_02)_paranthesis.cpp @@ -0,0 +1,64 @@ + +#include +using namespace std; + +class Solution +{ + public: + + bool ispar(string x) + { stack s; + for(int i=0;i>t; + while(t--) + { + cin>>a; + Solution obj; + if(obj.ispar(a)) + cout<<"balanced"< +using namespace std; + +class stackk + { + int n; + queue q1; + queue q2; + + public: + + stackk() + { + n = 0; + } + + void push(int x) + { + q1.push(x); + n++; + } + + void pop() + { + if(q1.empty()) + { + cout<<"Empty Stack"; + return; + } + while(q1.size()!=1) + { + q2.push(q1.front()); + q1.pop(); + } + q1.pop(); + n--; + queue temp = q1; + q1 = q2; + q2 = temp; + } + + int top() + { + if(q1.empty()) + { + cout<<"Empty Stack"; + return -1; + } + while(q1.size()!=1) + { + q2.push(q1.front()); + q1.pop(); + } + int ans = q1.front(); + q2.push(ans); + queue temp = q1; + q1 = q2; + q2 = temp; + return ans; + } + + int size(){return n;} + + }; + +int main() +{ + stackk s; + int n,x; + cin>>n; + + for(int i=0;i>x; + s.push(x); + } + + while(s.size()>0) + { + cout< +using namespace std; + +class stackk + { + int n; + queue q1; + queue q2; + + public: + + stackk() + { + n = 0; + } + + void push(int x) + { + q2.push(x); + while(!q1.empty()) + { + q2.push(q1.front()); + q1.pop(); + } + queue temp = q1; + q1 = q2; + q2 = temp; + n++; + } + + void pop() + { + if(q1.empty()) + { + cout<<"Empty Stack"; + return; + } + q1.pop(); + n--; + } + + int top(){ return q1.front();} + + int size(){return n;} + + }; + +int main() +{ + stackk s; + int n,x; + cin>>n; + + for(int i=0;i>x; + s.push(x); + } + + while(s.size()>0) + { + cout< +using namespace std; +void stock_span(int input[],int n,int span[]){ + stack s; + s.push(0); + span[0]=1; + for(int i=0;i>n; + int input[n]; + for(int i=0;i>input[i]; + } + int span[n]; + stock_span(input,n,span); + for(int i=0;i +using namespace std; + +class node + { + public: + int data; + node* next; + node(int x) + { + data = x; + next = NULL; + } + }; + +class que + { + node* front; + node* back; + + public: + + que() + { + front = NULL; + back = NULL; + } + + void push(int x); + void pop(); + int peek(); + bool isempty(); + }; + +void que::push(int x) + { + node* n = new node(x); + + if(isempty()) + { + front = n; + back = n; + } + + back->next = n; + back = n; + + } + +void que::pop() + { + if(isempty()) + { + cout<<"Queue is empty"; + return ; + } + node* todelete = front; + front = front->next; + delete todelete; + } + +int que::peek() + { + if(isempty()) + { + cout<<"Queue is empty"; + exit(1); + } + return front->data; + } + +bool que::isempty() + { + if(front == NULL) + { + return true; + } + else{return false;} + } + +int main() +{ + que q; + int n,m,x; + + cin>>n; + for(int i=0;i>x; + q.push(x); + } + + while(!q.isempty()) + { + cout< +using namespace std; + +class que + { + stacks1; + + public: + + void push(int x) + { + s1.push(x); + } + + int pop() + { + if(s1.empty()) + { + cout<<"Empty Queue"; + return -1; + } + + int x = s1.top(); + s1.pop(); + + if(s1.empty()) + { + return x; + } + int item = pop(); + s1.push(x); + return item; + + } + + bool isempty() + { + if(s1.empty()){ return true;} + return false; + } + + }; + +int main() +{ + que q; + int n,x; + cin>>n; + + for(int i=0;i>x; + q.push(x); + } + + while(!q.isempty()) + { + cout< +using namespace std; + +class que + { + stacks1; + stacks2; + + public: + + void push(int x) + { + s1.push(x); + } + + int pop() + { + if(s1.empty() and s2.empty()) + { + cout<<"Empty Queue"; + return -1; + } + + if(s2.empty()) + { + while(!s1.empty()) + { + s2.push(s1.top()); + s1.pop(); + } + } + int topval = s2.top(); + s2.pop(); + return topval; + } + + bool isempty() + { + if(s1.empty() and s2.empty()){ return true;} + return false; + } + + }; + +int main() +{ + que q; + int n,x; + cin>>n; + + for(int i=0;i>x; + q.push(x); + } + + while(!q.isempty()) + { + cout< +using namespace std; + + +struct Node{ + struct Node *left; + struct Node *right; + int key; + Node(int k){ + key=k; + left=right=NULL; + } +}; + +void bottomView(Node *root){ + mapmp; + queue>q; + q.push({root,0}); + while(!q.empty()){ + auto p=q.front(); + Node *curr=p.first; + int hd=p.second; + mp[hd]=curr->key; + q.pop(); + if(curr->left!=NULL)q.push({curr->left,hd-1}); + if(curr->right!=NULL)q.push({curr->right,hd+1}); + } + for(auto x:mp){ + cout<left=new Node(20); + root->right=new Node(30); + root->left->left=new Node(40); + root->left->right=new Node(50); + + bottomView(root); + return 0; +} diff --git a/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_02)_Ceilingin_BST.cpp b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_02)_Ceilingin_BST.cpp new file mode 100644 index 000000000..e0fbb0180 --- /dev/null +++ b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_02)_Ceilingin_BST.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; + +void printCeiling(int arr[], int n){ + cout<<"-1"<<" "; + set s; + s.insert(arr[0]); + for(int i=1;i +using namespace std; + +struct Node +{ + int key; + struct Node *left; + struct Node *right; + Node(int k){ + key=k; + left=right=NULL; + } +}; + +int prevv=INT_MIN; +bool isBST(Node* root) +{ + if (root == NULL) + return true; + + if(isBST(root->left)==false)return false; + + if(root->key<=prevv)return false; + prevv=root->key; + + return isBST(root->right); +} + +int main() { + + Node *root = new Node(4); + root->left = new Node(2); + root->right = new Node(5); + root->left->left = new Node(1); + root->left->right = new Node(3); + + if(isBST(root)) + cout<<"Is BST"; + else + cout<<"Not a BST"; + + return 0; + +} diff --git a/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_04)_Fix_BST_with_Two_Nodes_Swapped.cpp b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_04)_Fix_BST_with_Two_Nodes_Swapped.cpp new file mode 100644 index 000000000..55717589d --- /dev/null +++ b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_04)_Fix_BST_with_Two_Nodes_Swapped.cpp @@ -0,0 +1,56 @@ +// As it is Inorder Traversal - O(N) +#include +using namespace std; + +struct Node{ + int key; + struct Node *left; + struct Node *right; + Node(int k){ + key=k; + left=right=NULL; + } +}; + + +// Inorder Traversal +void inorder(Node *root){ + if(root!=NULL){ + inorder(root->left); + cout<key<<" "; + inorder(root->right); + } +} + +// Fixing the BST +Node *prevv=NULL,*first=NULL,*second=NULL; +void fixBST(Node *root){ + if(root==NULL)return ; + fixBST(root->left); + if(prevv!=NULL && root->keykey){ + if(first==NULL) first=prevv; + second=root; + + } + prevv=root; + fixBST(root->right); +} + + +int main(){ + Node *root=new Node(18); + root->left=new Node(60); + root->right=new Node(70); + root->left->left=new Node(40); + root->right->left=new Node(8); + root->right->right=new Node(80); + + inorder(root); + cout<key; + first->key=second->key; + second->key=temp; + inorder(root); + return 0; +} diff --git a/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_05)_Kth_Largest.cpp b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_05)_Kth_Largest.cpp new file mode 100644 index 000000000..1e17602d7 --- /dev/null +++ b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_05)_Kth_Largest.cpp @@ -0,0 +1,63 @@ +#include +using namespace std; + +struct Node +{ + int key; + struct Node *left; + struct Node *right; + int lCount; + Node(int k){ + key=k; + left=right=NULL; + lCount=0; + } +}; + +Node* insert(Node* root, int x) +{ + if (root == NULL) + return new Node(x); + + if (x < root->key) { + root->left = insert(root->left, x); + root->lCount++; + } + + else if (x > root->key) + root->right = insert(root->right, x); + return root; +} + +Node* kthSmallest(Node* root, int k) +{ + if (root == NULL) + return NULL; + + int count = root->lCount + 1; + if (count == k) + return root; + + if (count > k) + return kthSmallest(root->left, k); + + return kthSmallest(root->right, k - count); +} + +int main() { + + Node* root = NULL; + int keys[] = { 20, 8, 22, 4, 12, 10, 14 }; + + for (int x : keys) + root = insert(root, x); + + int k = 4; + Node* res = kthSmallest(root, k); + if (res == NULL) + cout << "There are less than k nodes in the BST"; + else + cout << "K-th Smallest Element is " << res->key; + return 0; + +} diff --git a/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_06)_PairSum.cpp b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_06)_PairSum.cpp new file mode 100644 index 000000000..93876fef8 --- /dev/null +++ b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_06)_PairSum.cpp @@ -0,0 +1,46 @@ +#include +using namespace std; + +struct Node +{ + int key; + struct Node *left; + struct Node *right; + Node(int k){ + key=k; + left=right=NULL; + } +}; + +bool isPairSum(Node *root, int sum, unordered_set &s) + { + if(root==NULL)return false; + + if(isPairSum(root->left,sum,s)==true) + return true; + + if(s.find(sum-root->key)!=s.end()) + return true; + else + s.insert(root->key); + return isPairSum(root->right,sum,s); + } + +int main() { + + Node *root = new Node(10); + root->left = new Node(8); + root->right = new Node(20); + root->left->left = new Node(4); + root->left->right = new Node(9); + root->right->left = new Node(11); + root->right->right = new Node(30); + root->right->right->left = new Node(25); + + int sum=33; + unordered_set s; + cout< +using namespace std; + + +struct Node{ + struct Node *left; + struct Node *right; + int key; + Node(int k){ + key=k; + left=right=NULL; + } +}; + +void topView(Node *root){ + mapmp; + queue>q; + q.push({root,0}); + while(!q.empty()){ + auto p=q.front(); + Node *curr=p.first; + int hd=p.second; + if(mp.find(hd)==mp.end()) + mp[hd]=curr->key; + q.pop(); + if(curr->left!=NULL)q.push({curr->left,hd-1}); + if(curr->right!=NULL)q.push({curr->right,hd+1}); + } + for(auto x:mp){ + cout<left=new Node(20); + root->right=new Node(30); + root->left->left=new Node(40); + root->left->right=new Node(50); + + topView(root); + return 0; +} diff --git a/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_08)_Vertical_Sum_of_Binary_Tree.cpp b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_08)_Vertical_Sum_of_Binary_Tree.cpp new file mode 100644 index 000000000..d9cafa968 --- /dev/null +++ b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_08)_Vertical_Sum_of_Binary_Tree.cpp @@ -0,0 +1,41 @@ +#include +using namespace std; + +struct Node +{ + int key; + struct Node *left; + struct Node *right; + Node(int k){ + key=k; + left=right=NULL; + } +}; + +void vSumR(Node *root,int hd,map &mp){ + if(root==NULL)return; + vSumR(root->left,hd-1,mp); + mp[hd]+=root->key; + vSumR(root->right,hd+1,mp); +} + +void vSum(Node *root){ + map mp; + vSumR(root,0,mp); + for(auto sum: mp) + cout<left = new Node(20); + root->right = new Node(50); + root->left->left = new Node(30); + root->left->right = new Node(40); + + vSum(root); + + return 0; + +} diff --git a/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_09)_Vertical_Traversal_of_Binary_Tree.cpp b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_09)_Vertical_Traversal_of_Binary_Tree.cpp new file mode 100644 index 000000000..a83c8d379 --- /dev/null +++ b/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/_09)_Vertical_Traversal_of_Binary_Tree.cpp @@ -0,0 +1,45 @@ +#include +using namespace std; + + +struct Node{ + struct Node *left; + struct Node *right; + int key; + Node(int k){ + key=k; + left=right=NULL; + } +}; + +void vTraversal(Node *root){ + map>mp; + queue>q; + q.push({root,0}); + while(!q.empty()){ + auto p=q.front(); + Node *curr=p.first; + int hd=p.second; + mp[hd].push_back(curr->key); + q.pop(); + if(curr->left!=NULL)q.push({curr->left,hd-1}); + if(curr->right!=NULL)q.push({curr->right,hd+1}); + } + for(auto x:mp){ + for(int y:x.second) + cout<left=new Node(20); + root->right=new Node(30); + root->left->left=new Node(40); + root->left->right=new Node(50); + + vTraversal(root); + return 0; +} diff --git a/1]. DSA/2]. Algorithms/01]. Searching Algorithms/Java/BFS.java b/1]. DSA/2]. Algorithms/01]. Searching Algorithms/Java/BFS.java new file mode 100644 index 000000000..b6cdf599c --- /dev/null +++ b/1]. DSA/2]. Algorithms/01]. Searching Algorithms/Java/BFS.java @@ -0,0 +1,60 @@ + +import java.util.*; + +public class BFS { + private int V; + private LinkedList adj[]; + + // Create a graph + BFS(int v) { + V = v; + adj = new LinkedList[v]; + for (int i = 0; i < v; ++i) + adj[i] = new LinkedList(); + } + + // Add edges to the graph + void addEdge(int v, int w) { + adj[v].add(w); + } + + // BFS algorithm + void BFS_algorithm(int s) { + + boolean visited[] = new boolean[V]; + + LinkedList queue = new LinkedList(); + + visited[s] = true; + queue.add(s); + + while (queue.size() != 0) { + s = queue.poll(); + System.out.print(s + " "); + + Iterator i = adj[s].listIterator(); + while (i.hasNext()) { + int n = i.next(); + if (!visited[n]) { + visited[n] = true; + queue.add(n); + } + } + } + } + + public static void main(String args[]) { + BFS g = new BFS(4); + /* Here Give Your Input */ + g.addEdge(0, 1); + g.addEdge(0, 2); + g.addEdge(1, 2); + g.addEdge(2, 0); + g.addEdge(2, 3); + g.addEdge(3, 3); + + System.out.println("Following is Breadth First Traversal " + "(starting from vertex 2)"); + + g.BFS_algorithm(2); + } +} diff --git a/1]. DSA/2]. Algorithms/01]. Searching Algorithms/Java/DepthFirstSearch.java b/1]. DSA/2]. Algorithms/01]. Searching Algorithms/Java/DepthFirstSearch.java new file mode 100644 index 000000000..93f1f792a --- /dev/null +++ b/1]. DSA/2]. Algorithms/01]. Searching Algorithms/Java/DepthFirstSearch.java @@ -0,0 +1,85 @@ +//An Iterative Java program to do DFS traversal from +//a given source vertex. DFS(int s) traverses vertices +//reachable from s. + +import java.util.*; + +public class DepthFirstSearch { + // This class represents a directed graph using adjacency + // list representation + static class Graph { + int V; // Number of Vertices + + LinkedList[] adj; // adjacency lists + + // Constructor + Graph(int V) { + this.V = V; + adj = new LinkedList[V]; + + for (int i = 0; i < adj.length; i++) + adj[i] = new LinkedList(); + + } + + // To add an edge to graph + void addEdge(int v, int w) { + adj[v].add(w); // Add w to v’s list. + } + + // prints all not yet visited vertices reachable from s + void DFS(int s) { + // Initially mark all vertices as not visited + Vector visited = new Vector(V); + for (int i = 0; i < V; i++) + visited.add(false); + + // Create a stack for DFS + Stack stack = new Stack<>(); + + // Push the current source node + stack.push(s); + + while (stack.empty() == false) { + // Pop a vertex from stack and print it + s = stack.peek(); + stack.pop(); + + // Stack may contain same vertex twice. So + // we need to print the popped item only + // if it is not visited. + if (visited.get(s) == false) { + System.out.print(s + " "); + visited.set(s, true); + } + + // Get all adjacent vertices of the popped vertex s + // If a adjacent has not been visited, then push it + // to the stack. + Iterator itr = adj[s].iterator(); + + while (itr.hasNext()) { + int v = itr.next(); + if (!visited.get(v)) + stack.push(v); + } + + } + } + } + + // Driver program to test methods of graph class + public static void main(String[] args) { + // Total 5 vertices in graph + Graph g = new Graph(5); + /* Here Give Your Inpt */ + g.addEdge(1, 0); + g.addEdge(0, 2); + g.addEdge(2, 1); + g.addEdge(0, 3); + g.addEdge(1, 4); + + System.out.println("Following is the Depth First Traversal"); + g.DFS(0); + } +} diff --git a/1]. DSA/2]. Algorithms/02]. Sorting Algorithms/C++/_1)_Merge Sort On 2 Linked Lists.cpp b/1]. DSA/2]. Algorithms/02]. Sorting Algorithms/C++/_1)_Merge Sort On 2 Linked Lists.cpp new file mode 100644 index 000000000..544f44564 --- /dev/null +++ b/1]. DSA/2]. Algorithms/02]. Sorting Algorithms/C++/_1)_Merge Sort On 2 Linked Lists.cpp @@ -0,0 +1,86 @@ +#include +using namespace std; +class node{ + public: + int data; + node* next; + node(int d){ + data=d; + next=NULL; + } +}; +void insertatend(node*&head,int d){ + if(head==NULL){ + head= new node(d); + return; + } + node *n=new node(d); + node* temp=head; + while(temp->next!=NULL) + temp=temp->next; + temp->next=n; +} +node* insert_list(){ + node*head=NULL; + int d; + cin>>d; + while(d!=-1){ + insertatend(head,d); + cin>>d; + } + return head; +} +node* midpoint(node* head){ + if(head==NULL||head->next==NULL) + return head; + node* slow=head; + node* fast=head; + while(fast!=NULL&&fast->next!=NULL){ + fast=fast->next->next; + slow=slow->next; + } + return slow; +} +node* merge(node*a,node*b){ + if(a==NULL) + return b; + if(b==NULL) + return a; + node* c=NULL; + if(a->datadata){ + c=a; + c->next=merge(a->next,b); + } + else{ + c=b; + c->next=merge(a,b->next); + } + return c; +} +node* mergesort(node*head){ + if(head==NULL||head->next==NULL) + return head; + node* mid= midpoint(head); + node* a=head; + node*b=mid->next; + mid->next=NULL; + a=mergesort(a); + b=mergesort(b); + node* c=merge(a,b); + return c; +} +void printlist(node* head){ + while(head!=NULL) + { + cout<data<<"->"; + head=head->next; + } +} +int main(){ + node* head=NULL; + head=insert_list(); + printlist(head); + cout<= 0) && (A[j] > temp)) { + A[j + 1] = A[j]; + j = j - 1; + } + A[j + 1] = temp; + } + System.out.println("The Sorted List of Elements : "); + for (int i = 0; i < n; i++) { + System.out.println("\n" + A[i]); + } + } + + public static void main(String[] args) { + int A[] = new int[10]; + System.out.println("\t\tINSERTION SORT:"); + Scanner input = new Scanner(System.in); + System.out.print("How Many Elements Are There? : "); + int n = input.nextInt(); + System.out.println("Enter Elements: "); + for (int i = 0; i < n; i++) { + A[i] = input.nextInt(); + } + Insertion(A, n); + input.close(); + } +} diff --git a/1]. DSA/2]. Algorithms/02]. Sorting Algorithms/Java/MergeSort.java b/1]. DSA/2]. Algorithms/02]. Sorting Algorithms/Java/MergeSort.java new file mode 100644 index 000000000..72ab9b38c --- /dev/null +++ b/1]. DSA/2]. Algorithms/02]. Sorting Algorithms/Java/MergeSort.java @@ -0,0 +1,77 @@ +import java.util.Scanner; + +public class MergeSort { + static int MAX = 10; + + public static void main(String[] args) { + int A[] = new int[MAX]; + int high, low; + Scanner input = new Scanner(System.in); + System.out.println("\t\t\tSorting Using Merge Sort"); + System.out.println("How Many Elements Wanna Add? : "); + int n = input.nextInt(); + System.out.println("Enter " + n + " Elements: "); + for (int i = 0; i < n; i++) { + A[i] = input.nextInt(); + } + low = 0; + high = n - 1; + Merge(A, low, high); + Display(A, n); + input.close(); + } + /* ALgorithm of MergeSort */ + + public static void Merge(int A[], int low, int high) { + int mid; + // void Combine + if (low < high) { + mid = (low + high) / 2; + Merge(A, low, mid); + Merge(A, mid + 1, high); + Combine(A, low, mid, high); + } + } + + /* Combining Method */ + public static void Combine(int A[], int low, int mid, int high) { + int i, j, k; + int[] temp = new int[MAX]; + k = low; + i = low; + j = mid + 1; + while (i <= mid && j <= high) { + if (A[i] <= A[j]) { + temp[k] = A[i]; + i++; + k++; + } else { + temp[k] = A[j]; + j++; + k++; + } + } + while (i <= mid) { + temp[k] = A[i]; + i++; + k++; + } + while (j <= high) { + temp[k] = A[j]; + j++; + k++; + } + for (k = low; k <= high; k++) { + A[k] = temp[k]; + } + } + + /* Displaying Output */ + + static void Display(int A[], int n) { + System.out.println("\t\t The Sorted List:..."); + for (int i = 0; i < n; i++) { + System.out.println(A[i] + "\t"); + } + } +} \ No newline at end of file diff --git a/1]. DSA/2]. Algorithms/06]. Greedy/Java/DijkstraAlgorithm.java b/1]. DSA/2]. Algorithms/06]. Greedy/Java/DijkstraAlgorithm.java new file mode 100644 index 000000000..587d950cd --- /dev/null +++ b/1]. DSA/2]. Algorithms/06]. Greedy/Java/DijkstraAlgorithm.java @@ -0,0 +1,130 @@ + +// Java implementation of Dijkstra's Algorithm +// using Priority Queue +import java.util.*; + +public class DijkstraAlgorithm { + private int dist[]; + private Set settled; + private PriorityQueue pq; + private int V; // Number of vertices + List> adj; + + public DijkstraAlgorithm(int V) { + this.V = V; + dist = new int[V]; + settled = new HashSet(); + pq = new PriorityQueue(V, new Node()); + } + + // Function for Dijkstra's Algorithm + public void dijkstra(List> adj, int src) { + this.adj = adj; + + for (int i = 0; i < V; i++) + dist[i] = Integer.MAX_VALUE; + + // Add source node to the priority queue + pq.add(new Node(src, 0)); + + // Distance to the source is 0 + dist[src] = 0; + while (settled.size() != V) { + // when the priority queue is empty, return + if (pq.isEmpty()) + return; + // remove the minimum distance node + // from the priority queue + int u = pq.remove().node; + + // adding the node whose distance is + // finalized + settled.add(u); + + e_Neighbours(u); + } + } + + // Function to process all the neighbours + // of the passed node + private void e_Neighbours(int u) { + int edgeDistance = -1; + int newDistance = -1; + + // All the neighbors of v + for (int i = 0; i < adj.get(u).size(); i++) { + Node v = adj.get(u).get(i); + + // If current node hasn't already been processed + if (!settled.contains(v.node)) { + edgeDistance = v.cost; + newDistance = dist[u] + edgeDistance; + + // If new distance is cheaper in cost + if (newDistance < dist[v.node]) + dist[v.node] = newDistance; + + // Add the current node to the queue + pq.add(new Node(v.node, dist[v.node])); + } + } + } + + // Driver code + public static void main(String arg[]) { + int V = 5; + int source = 0; + + // Adjacency list representation of the + // connected edges + List> adj = new ArrayList>(); + + // Initialize list for every node + for (int i = 0; i < V; i++) { + List item = new ArrayList(); + adj.add(item); + } + + // Inputs for the DPQ graph + adj.get(0).add(new Node(1, 9)); + adj.get(0).add(new Node(2, 6)); + adj.get(0).add(new Node(3, 5)); + adj.get(0).add(new Node(4, 3)); + + adj.get(2).add(new Node(1, 2)); + adj.get(2).add(new Node(3, 4)); + + // Calculate the single source shortest path + DijkstraAlgorithm dpq = new DijkstraAlgorithm(V); + dpq.dijkstra(adj, source); + + // Print the shortest path to all the nodes + // from the source node + System.out.println("The shorted path from node :"); + for (int i = 0; i < dpq.dist.length; i++) + System.out.println("\t\t"+source + " to " + i + " is " + dpq.dist[i]); + } +} + +// Class to represent a node in the graph +class Node implements Comparator { + public int node; + public int cost; + + public Node() { + } + + public Node(int node, int cost) { + this.node = node; + this.cost = cost; + } + + @Override + public int compare(Node node1, Node node2) { + if (node1.cost < node2.cost) + return -1; + if (node1.cost > node2.cost) + return 1; + return 0; + } +} diff --git a/1]. DSA/2]. Algorithms/06]. Greedy/Java/PrimsAlgorithm.java b/1]. DSA/2]. Algorithms/06]. Greedy/Java/PrimsAlgorithm.java new file mode 100644 index 000000000..6371bc5f9 --- /dev/null +++ b/1]. DSA/2]. Algorithms/06]. Greedy/Java/PrimsAlgorithm.java @@ -0,0 +1,93 @@ +// A Java program for Prim's Minimum Spanning Tree (MST) algorithm. +// The program is for adjacency matrix representation of the graph + +public class PrimsAlgorithm { + // Number of vertices in the graph + private static final int V = 5; + + // A utility function to find the vertex with minimum key + // value, from the set of vertices not yet included in MST + int minKey(int key[], Boolean mstSet[]) { + // Initialize min value + int min = Integer.MAX_VALUE, min_index = -1; + + for (int v = 0; v < V; v++) + if (mstSet[v] == false && key[v] < min) { + min = key[v]; + min_index = v; + } + + return min_index; + } + + // A utility function to print the constructed MST stored in + // parent[] + void printMST(int parent[], int graph[][]) { + System.out.println("\t\tEdge \tWeight"); + for (int i = 1; i < V; i++) + System.out.println("\t\t"+parent[i] + " - " + i + "\t" + graph[i][parent[i]]); + } + + // Function to construct and print MST for a graph represented + // using adjacency matrix representation + void primMST(int graph[][]) { + // Array to store constructed MST + int parent[] = new int[V]; + + // Key values used to pick minimum weight edge in cut + int key[] = new int[V]; + + // To represent set of vertices included in MST + Boolean mstSet[] = new Boolean[V]; + + // Initialize all keys as INFINITE + for (int i = 0; i < V; i++) { + key[i] = Integer.MAX_VALUE; + mstSet[i] = false; + } + + // Always include first 1st vertex in MST. + key[0] = 0; // Make key 0 so that this vertex is + // picked as first vertex + parent[0] = -1; // First node is always root of MST + + // The MST will have V vertices + for (int count = 0; count < V - 1; count++) { + // Pick thd minimum key vertex from the set of vertices + // not yet included in MST + int u = minKey(key, mstSet); + + // Add the picked vertex to the MST Set + mstSet[u] = true; + + // Update key value and parent index of the adjacent + // vertices of the picked vertex. Consider only those + // vertices which are not yet included in PrimsAlgorithm + for (int v = 0; v < V; v++) + + // graph[u][v] is non zero only for adjacent vertices of m + // mstSet[v] is false for vertices not yet included in MST + // Update the key only if graph[u][v] is smaller than key[v] + if (graph[u][v] != 0 && mstSet[v] == false && graph[u][v] < key[v]) { + parent[v] = u; + key[v] = graph[u][v]; + } + } + + // print the constructed MST + printMST(parent, graph); + } + + public static void main(String[] args) { + /* + * Let us create the following graph 2 3 (0)--(1)--(2) | / \ | 6| 8/ \5 |7 | / \ + * | (3)-------(4) 9 + */ + PrimsAlgorithm t = new PrimsAlgorithm(); + int graph[][] = new int[][] { { 0, 2, 0, 6, 0 }, { 2, 0, 3, 8, 5 }, { 0, 3, 0, 0, 7 }, { 6, 8, 0, 0, 9 }, + { 0, 5, 7, 9, 0 } }; + + // Print the solution + t.primMST(graph); + } +} diff --git a/1]. DSA/2]. Algorithms/07]. Dynamic Programming/C++/_1)_Minimum Steps to reach the end.cpp b/1]. DSA/2]. Algorithms/07]. Dynamic Programming/C++/_1)_Minimum Steps to reach the end.cpp new file mode 100644 index 000000000..50ec9e893 --- /dev/null +++ b/1]. DSA/2]. Algorithms/07]. Dynamic Programming/C++/_1)_Minimum Steps to reach the end.cpp @@ -0,0 +1,27 @@ +#include +using namespace std; +int min_steps(int *a,int n,vectordp,int i){ + if(i==n-1) + return 0; + if(i>=n) + return INT_MAX; + int max_jump=a[i]; + int steps=INT_MAX; + for(int jump=1;jump<=max_jump;jump++){ + int nextcell=i+jump; + int subproblem=min_steps(a,n,dp,nextcell); + if(subproblem!=INT_MAX){ + steps=min(steps,subproblem+1); + } + } + return dp[n]=steps; +} +int main(){ + int n; + cin>>n; + int a[n]; + for(int i=0;i>a[i]; + vectordp(n+1,0); + cout< +using namespace std; +int min_cost(int n,int *heights, vectordp){ + //there wont be any cost for the first stone + dp[0]=0; + //there is only one option here as the frog can jump to the second stone from only the first stone, hence the cost + dp[1]=abs(heights[1]-heights[0]); + //from i=2, there are two choices at every step, a frog can come to step i either from step i-1 or step i-2. + //For eg, for i-2, frog can come from stone 0 or stone 1. + //since we have to find the minimum cost, we are just findingthe minimum cost of the two possibilities and returning it as the answer. + for(int i=2;i<=n-1;i++){ + int first_stone=dp[i-1]+abs(heights[i]-heights[i-1]);//dp[i-1] indicates the previous cost of that particular state. we are just including the current cost after that. + int second_stone=dp[i-2]+abs(heights[i]-heights[i-2]); + dp[i]=min(first_stone,second_stone); + } + return dp[n-1]; + +} +int main(){ + int n; + cin>>n; + int heights[n]; + for(int i=0;i>heights[i]; + } + vectordp(n+1,0); + cout< +using namespace std; +int minCoins(int coins[], int M, int V) + { + int dp[V+1]={0}; + for(int i=1;i<=V;i++){ + dp[i]=INT_MAX; + for(int j=0;j=0 and dp[i-coins[j]]!=-1){ + int subproblem=dp[i-coins[j]]; + dp[i]=min(dp[i],subproblem+1); + } + } + if(dp[i]==INT_MAX) + dp[i]=-1; + } + return dp[V]; + } +int main(){ + int types_of_coins; + cin>>types_of_coins; + int coins[types_of_coins]; + for(int i=0;i>coins[i]; + } + int V; //amount + cin>>V; + cout< +using namespace std; +int max_profit(int n,int prices[],int i,int j,int y,int dp[100][100]){ + //base case + if(i>j){ + return 0; + } + if(dp[i][j]!=0){ + return dp[i][j]; + } + //recursive case + int op1,op2; + op1=prices[i]*y+max_profit(n,prices,i+1,j,y+1,dp); + op2=prices[j]*y+max_profit(n,prices,i,j-1,y+1,dp); + int ans=max(op1,op2); + return dp[i][j]=ans; +} +int main(){ + int n; + cin>>n; + int prices[n]; + for(int i=0;i>prices[i]; + } + int dp[100][100]={0}; + cout< +using namespace std; +int ladder_problem_Bottom_up_optimised(int n,int k){ + int dp[n+1]={0}; + dp[0]=dp[1]=1; + for(int i=2;i<=n;i++){ + dp[i]=2*dp[i-1]; + } + for(int i=2;i<=n;i++){ + if(i-(k+1)>=0) + dp[i]=2*dp[i-1] - dp[i-(k+1)]; + } + return dp[n]; +} +int main(){ + int n,k; + cin>>n>>k; + int ans=ladder_problem_Bottom_up_optimised(n,k); + cout< +using namespace std; +bool canPlaceBoxes(vectorb1,vectorb2){ + if(b1[0]>b2[0]&&b1[1]>b2[1]&&b1[2]>b2[2]) + return true; + return false; +} +bool BoxCompare(vectorb1, vectorb2){ + return b1[2]>b2[2]; +} +int box_stacking(vector>&boxes){ + //sorting the boxes based on their heights + //creating a custom compare function + sort(boxes.begin(),boxes.end(),BoxCompare); + int n=boxes.size(); + vectordp(n+1,0); + //filling dp array with the heights + for(int i=0;idp[i]){ + dp[i]=dp[j]+current_height; + } + } + } + } + int max_height=INT_MIN; + for(int i=0;i> boxes={ + {2,1,2}, + {3,2,3}, + {2,2,8}, + {2,3,4}, + {2,2,1}, + {4,4,5}, + }; + //ans should be 10 + int height=box_stacking(boxes); + cout<<"Max Height"<<" "< +using namespace std; +int No_of_ways(int n){ + int dp[n+1]={0}; + dp[0]=dp[1]=1; + for(int i=2;i<=n;i++){ + dp[i]=(i-1)*dp[i-2]+dp[i-1]; + } + return dp[n]; +} +int main(){ + int n; + cin>>n; + int ans=No_of_ways(n); + cout< +#include +using namespace std; +bool canPlace(int n,int grid[9][9],int i,int j,int number){ + //row and column check + for(int row=0;row + +void rotate(int arr[], int n); + +int main() +{ + int t; + scanf("%d",&t); + while(t--) + { + int n; + scanf("%d",&n); + int a[n] , i; + for(i=0;i 0; i--) + arr[i] = arr[i - 1]; + arr[0] = x; +} \ No newline at end of file diff --git a/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_08)_Kadane's_Algorithm.cpp b/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_08)_Kadane's_Algorithm.cpp new file mode 100644 index 000000000..e2aad8526 --- /dev/null +++ b/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_08)_Kadane's_Algorithm.cpp @@ -0,0 +1,65 @@ +//Link : https://practice.geeksforgeeks.org/problems/kadanes-algorithm-1587115620/1 + +/* Given an array arr of N integers. Find the contiguous sub-array with maximum sum. + + + +Example 1: + +Input: +N = 5 +arr[] = {1,2,3,-2,5} +Output: +9 +Explanation: +Max subarray sum is 9 +of elements (1, 2, 3, -2, 5) which +is a contiguous subarray.*/ +#include +using namespace std; + + + // } Driver Code Ends + + +// Function to find subarray with maximum sum +// arr: input array +// n: size of array +int maxSubarraySum(int arr[], int n){ + + // Your code here + int i,maxCur=arr[0]; + int totalsum=arr[0]; + for(i=1;itotalsum) + { + totalsum=maxCur; + } + } + return totalsum; + +} + +// { Driver Code Starts. + +int main() +{ + int t,n; + + cin>>t; //input testcases + while(t--) //while testcases exist + { + + cin>>n; //input size of array + + int a[n]; + + for(int i=0;i>a[i]; //inputting elements of array + + cout << maxSubarraySum(a, n) << endl; + } +} + // } Driver Code Ends \ No newline at end of file diff --git a/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_10)_Minimum_number_of_jumps.cpp b/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_10)_Minimum_number_of_jumps.cpp new file mode 100644 index 000000000..030b82f45 --- /dev/null +++ b/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_10)_Minimum_number_of_jumps.cpp @@ -0,0 +1,100 @@ +//Links : https://practice.geeksforgeeks.org/problems/minimum-number-of-jumps-1587115620/1 + +/* +Given an array of integers where each element represents the max number of steps that can be made forward from that element. Find the minimum number of jumps to reach the end of the array (starting from the first element). If an element is 0, then you cannot move through that element. + +Example 1: + +Input: +N=11 +arr=1 3 5 8 9 2 6 7 6 8 9 +Output: 3 +Explanation: +First jump from 1st element to 2nd +element with value 3. Now, from here +we jump to 5th element with value 9, +and from here we will jump to last. */ + +#include +using namespace std; + + +// Function to return minimum number of jumps to end of array +int minJumps(int arr[], int n){ + // Your code here + // The number of jumps needed to + // reach the starting index is 0 + if (n <= 1) + return 0; + + // Return -1 if not possible to jump + if (arr[0] == 0) + return -1; + + // initialization + // stores all time the maximal + // reachable index in the array. + int maxReach = arr[0]; + + // stores the number of steps + // we can still take + int step = arr[0]; + + // stores the number of jumps + // necessary to reach that maximal + // reachable position. + int jump = 1; + + // Start traversing array + int i = 1; + for (i = 1; i < n; i++) { + // Check if we have reached the end of the array + if (i == n - 1) + return jump; + + // updating maxReach + maxReach = max(maxReach, i + arr[i]); + + // we use a step to get to the current index + step--; + + // If no further steps left + if (step == 0) { + // we must have used a jump + jump++; + + // Check if the current index/position or lesser index + // is the maximum reach point from the previous indexes + if (i >= maxReach) + return -1; + + // re-initialize the steps to the amount + // of steps to reach maxReach from position i. + step = maxReach - i; + } + } + + return -1; + +} + + +// { Driver Code Starts. + +int main() +{ + int t; + cin>>t; + while(t--) + { + int n,i,j; + cin>>n; + int arr[n]; + for(int i=0; i>arr[i]; + + cout<& nums) { + sort(nums.begin(),nums.end()); + int l=0,h=nums.size()-1,mid; + while(l=0 &&j=arr2[j]) + { + swap(arr1[i],arr2[j]); + + } + else { + break; + } + } + sort(arr1,arr1+n); + sort(arr2,arr2+m); + + + } \ No newline at end of file diff --git a/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_18)_Count_pairs_with_given_sum.cpp b/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_18)_Count_pairs_with_given_sum.cpp new file mode 100644 index 000000000..88e059be8 --- /dev/null +++ b/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_18)_Count_pairs_with_given_sum.cpp @@ -0,0 +1,69 @@ +//Link : https://practice.geeksforgeeks.org/problems/count-pairs-with-given-sum5022/1 +//Code by Raunak Pandey +/* +Given an array of N integers, and an integer K, find the number of pairs of elements in the array whose sum is equal to K. + + +Example 1: + +Input: +N = 4, K = 6 +arr[] = {1, 5, 7, 1} +Output: 2 +Explanation: +arr[0] + arr[1] = 1 + 5 = 6 +and arr[1] + arr[3] = 5 + 1 = 6.*/ + + +#include +using namespace std; + +class Solution{ +public: + int getPairsCount(int arr[], int n, int k) { + // code here + unordered_map m; + + // Store counts of all elements in map m + for (int i = 0; i < n; i++) + m[arr[i]]++; + + int count = 0; + + // iterate through each element and increment the + // count (Notice that every pair is counted twice) + for (int i = 0; i < n; i++) { + count += m[k - arr[i]]; + + // if (arr[i], arr[i]) pair satisfies the condition, + // then we need to ensure that the count is + // decreased by one such that the (arr[i], arr[i]) + // pair is not considered + if (k - arr[i] == arr[i]) + count--; + } + + // return the half of twice_count + return count / 2; + } +}; + +// { Driver Code Starts. + +int main() { + int t; + cin >> t; + while (t--) { + int n, k; + cin >> n >> k; + int arr[n]; + for (int i = 0; i < n; i++) { + cin >> arr[i]; + } + Solution ob; + auto ans = ob.getPairsCount(arr, n, k); + cout << ans << "\n"; + } + + return 0; +} // } Driver Code Ends \ No newline at end of file diff --git a/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_19)_Common_elements.cpp b/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_19)_Common_elements.cpp new file mode 100644 index 000000000..fa93daadb --- /dev/null +++ b/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/C++/01]. Array/_19)_Common_elements.cpp @@ -0,0 +1,76 @@ +//Link: https://practice.geeksforgeeks.org/problems/common-elements1132/1 +/* +Given three arrays sorted in increasing order. Find the elements that are common in all three arrays. +Note: can you take care of the duplicates without using any additional Data Structure? + +Example 1: + +Input: +n1 = 6; A = {1, 5, 10, 20, 40, 80} +n2 = 5; B = {6, 7, 20, 80, 100} +n3 = 8; C = {3, 4, 15, 20, 30, 70, 80, 120} +Output: 20 80 +Explanation: 20 and 80 are the only +common elements in A, B and C.*/ +#include +using namespace std; + + + + +class Solution +{ + public: + vector commonElements (int A[], int B[], int C[], int n1, int n2, int n3) + { + //code here. + int i=0,j=0,k=0; + vector v; + while(i> t; + while (t--) + { + int n1, n2, n3; + cin >> n1 >> n2 >> n3; + int A[n1]; + int B[n2]; + int C[n3]; + + for (int i = 0; i < n1; i++) cin >> A[i]; + for (int i = 0; i < n2; i++) cin >> B[i]; + for (int i = 0; i < n3; i++) cin >> C[i]; + + Solution ob; + + vector res = ob.commonElements (A, B, C, n1, n2, n3); + if (res.size () == 0) + cout << -1; + for (int i = 0; i < res.size (); i++) + cout << res[i] << " "; + cout << endl; + } +} // } Driver Code Ends \ No newline at end of file diff --git a/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/Readme.md b/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/Readme.md index 0568c33fe..bdac0f82f 100644 --- a/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/Readme.md +++ b/1]. DSA/450 DSA by ( Love Babbar Bhaiya )/Readme.md @@ -14,20 +14,20 @@ | 3 | `Array` | Find the "Kth" max and min element of an array |✔️ | | | | | 4 | `Array` | Given an array which consists of only 0, 1 and 2. Sort the array without using any sorting algo |✔️ | | | | | 5 | `Array` | Move all the negative elements to one side of the array |✔️ | | | | -| 6 | `Array` | Find the Union and Intersection of the two sorted arrays. |✔️ | | | | -| 7 | `Array` | Write a program to cyclically rotate an array by one. |✔️ | | | | -| 8 | `Array` | find Largest sum contiguous Subarray [V. IMP] |✔️ | | | | +| 6 | `Array` | Find the Union and Intersection of the two sorted arrays. |✔️ | | | | +| 7 | `Array` | Write a program to cyclically rotate an array by one. |✔️ | | | | +| 8 | `Array` | find Largest sum contiguous Subarray [V. IMP] |✔️ | | | | | 9 | `Array` | Minimise the maximum difference between heights [V.IMP] |✔️ | | | | -| 10 | `Array` | Minimum no. of Jumps to reach end of an array |✔️ | | | | -| 11 | `Array` | find duplicate in an array of N+1 Integers |❌ | | | | -| 12 | `Array` | Merge 2 sorted arrays without using Extra space. |❌ | | | | +| 10 | `Array` | Minimum no. of Jumps to reach end of an array |✔️ | | | | +| 11 | `Array` | find duplicate in an array of N+1 Integers |✔️ | | | | +| 12 | `Array` | Merge 2 sorted arrays without using Extra space. |✔️ | | | | | 13 | `Array` | Kadane's Algo [V.V.V.V.V IMP] |❌ | | | | | 14 | `Array` | Merge Intervals |❌ | | | | | 15 | `Array` | Next Permutation |❌ | | | | | 16 | `Array` | Count Inversion |❌ | | | | | 17 | `Array` | Best time to buy and Sell stock |❌ | | | | -| 18 | `Array` | find all pairs on integer array whose sum is equal to given number |❌ | | | | -| 19 | `Array` | find common elements In 3 sorted arrays |❌ | | | | +| 18 | `Array` | find all pairs on integer array whose sum is equal to given number |✔️ | | | | +| 19 | `Array` | find common elements In 3 sorted arrays |✔️ | | | | | 20 | `Array` | Rearrange the array in alternating positive and negative items with O(1) extra space |❌ | | | | | 21 | `Array` | Find if there is any subarray with sum equal to 0 |❌ | | | | | 22 | `Array` | Find factorial of a large number |❌ | | | | @@ -63,16 +63,16 @@ | S.No. | Topic: | Problem | Solutions | Python | C++ | Java | | ------- |:---------------------:|------------------------------------------------------------------------------------------------------|:---------:|--------|--------|--------| -| 1 | `Matrix` | Spiral traversal on a Matrix |❌ | | | | -| 2 | `Matrix` | Search an element in a matriix |❌ | | | | -| 3 | `Matrix` | Find median in a row wise sorted matrix |❌ | | | | -| 4 | `Matrix` | Find row with maximum no. of 1's |❌ | | | | -| 5 | `Matrix` | Print elements in sorted order using row-column wise sorted matrix |❌ | | | | +| 1 | `Matrix` | Spiral traversal on a Matrix |✔️ | | | | +| 2 | `Matrix` | Search an element in a matriix |✔️ | |
| | +| 3 | `Matrix` | Find median in a row wise sorted matrix |✔️ | | | | +| 4 | `Matrix` | Find row with maximum no. of 1's |✔️ | | | | +| 5 | `Matrix` | Print elements in sorted order using row-column wise sorted matrix |✔️ | | | | | 6 | `Matrix` | Maximum size rectangle |❌ | | | | | 7 | `Matrix` | Find a specific pair in matrix |❌ | | | | | 8 | `Matrix` | Rotate matrix by 90 degrees |❌ | | | | -| 9 | `Matrix` | Kth smallest element in a row-cpumn wise sorted matrix |❌ | | | | -| 10 | `Matrix` | Common elements in all rows of a given matrix |❌ | | | | +| 9 | `Matrix` | Kth smallest element in a row-cpumn wise sorted matrix |✔️ | | | | +| 10 | `Matrix` | Common elements in all rows of a given matrix |✔️ | | | |
@@ -89,8 +89,8 @@ | S.No. | Topic: | Problem | Solutions | Python | C++ | Java | | -------- |:---------------------:|------------------------------------------------------------------------------------------------------|:---------:|--------|--------|--------| -| 1 | `String` | Reverse a String |❌ | | | | -| 2 | `String` | Check whether a String is Palindrome or not |❌ | | | | +| 1 | `String` | Reverse a String |✔️ | | | | +| 2 | `String` | Check whether a String is Palindrome or not |✔️ | | | | | 3 | `String` | Find Duplicate characters in a string |❌ | | | | | 4 | `String` | Why strings are immutable in Java? |❌ | | | | | 5 | `String` | Write a Code to check whether one string is a rotation of another |❌ | | | | @@ -673,16 +673,16 @@ | S.No. | Topic: | Problem | Solutions | Python | C++ | Java | | -------- |:---------------------:|------------------------------------------------------------------------------------------------------|:---------:|--------|--------|--------| -| 1 | `Bit Manipulation` | Count set bits in an integer |❌ | | | | -| 2 | `Bit Manipulation` | Find the two non-repeating elements in an array of repeating elements |❌ | | | | -| 3 | `Bit Manipulation` | Count number of bits to be flipped to convert A to B |❌ | | | | -| 4 | `Bit Manipulation` | Count total set bits in all numbers from 1 to n |❌ | | | | -| 5 | `Bit Manipulation` | Program to find whether a no is power of two |❌ | | | | -| 6 | `Bit Manipulation` | Find position of the only set bit |❌ | | | | -| 7 | `Bit Manipulation` | Copy set bits in a range |❌ | | | | -| 8 | `Bit Manipulation` | Divide two integers without using multiplication, division and mod operator |❌ | | | | -| 9 | `Bit Manipulation` | Calculate square of a number without using *, / and pow() |❌ | | | | -| 10 | `Bit Manipulation` | Power Set |❌ | | | | +| 1 | `Bit Manipulation` | Count set bits in an integer |✔️ | | |
| +| 2 | `Bit Manipulation` | Find the two non-repeating elements in an array of repeating elements |✔️ | | |
| +| 3 | `Bit Manipulation` | Count number of bits to be flipped to convert A to B |✔️ | | | | +| 4 | `Bit Manipulation` | Count total set bits in all numbers from 1 to n |✔️ | | |

| +| 5 | `Bit Manipulation` | Program to find whether a no is power of two |✔️ | | | | +| 6 | `Bit Manipulation` | Find position of the only set bit |✔️ | | | | +| 7 | `Bit Manipulation` | Copy set bits in a range |✔️ | | |
| +| 8 | `Bit Manipulation` | Divide two integers without using multiplication, division and mod operator |✔️ | | | | +| 9 | `Bit Manipulation` | Calculate square of a number without using *, / and pow() |✔️ | | | | +| 10 | `Bit Manipulation` | Power Set |✔️ | | |
|
diff --git a/1]. DSA/Striver Series/30 Days of SDE Sheet/C++/Add Context.txt b/1]. DSA/Striver Series/30 Days of SDE Sheet/C++/Add Context.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/1]. DSA/Striver Series/30 Days of SDE Sheet/C++/Add Context.txt @@ -0,0 +1 @@ + diff --git a/1]. DSA/Striver Series/30 Days of SDE Sheet/Java/Add Context.txt b/1]. DSA/Striver Series/30 Days of SDE Sheet/Java/Add Context.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/1]. DSA/Striver Series/30 Days of SDE Sheet/Java/Add Context.txt @@ -0,0 +1 @@ + diff --git a/1]. DSA/Striver Series/30 Days of SDE Sheet/Python/Add Context.txt b/1]. DSA/Striver Series/30 Days of SDE Sheet/Python/Add Context.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/1]. DSA/Striver Series/30 Days of SDE Sheet/Python/Add Context.txt @@ -0,0 +1 @@ + diff --git a/1]. DSA/Striver Series/30 Days of SDE Sheet/Readme.md b/1]. DSA/Striver Series/30 Days of SDE Sheet/Readme.md new file mode 100644 index 000000000..a75e3cfb1 --- /dev/null +++ b/1]. DSA/Striver Series/30 Days of SDE Sheet/Readme.md @@ -0,0 +1,47 @@ +# [30 Days of SDE Sheet](https://docs.google.com/document/d/1SM92efk8oDl8nyVw8NHPnbGexTS9W-1gmTEYfEurLWQ/edit) + +## Day-1: (Arrays) + +
+ + + + +| S.No. | Topic: | Problem | Solutions | Python | C++ | Java | Video-Solution | +| ------- |:---------------------:|------------------------------------------------------------------------------------------------------|:---------:|--------|--------|--------|----------------| +| 1 | `Array` | Sort an array of 0’s 1’s 2’s without using extra space or sorting algo |❌ | | | | | +| 2 | `Array` | Repeat and Missing Number |❌ | | | | | +| 3 | `Array` | Merge two sorted Arrays without extra space |❌ | | | | | +| 4 | `Array` | Kadane’s Algorithm |❌ | | | | | +| 5 | `Array` | Merge Overlapping Subintervals |❌ | | | | | +| 6 | `Array` | Find the duplicate in an array of N+1 integers |❌ | | | | | + +
+ +
+
+ +## Day-2: (Arrays) + +
+ + + + +| S.No. | Topic: | Problem | Solutions | Python | C++ | Java | Video-Solution | +| ------- |:---------------------:|------------------------------------------------------------------------------------------------------|:---------:|--------|--------|--------|----------------| +| 1 | `Array` | Set Matrix Zeros |❌ | | | | | +| 2 | `Array` | Pascal Triangle |❌ | | | | | +| 3 | `Array` | Next Permutation |❌ | | | | | +| 4 | `Array` | Inversion of Array |❌ | | | | | +| 5 | `Array` | Stock Buy and Sell |❌ | | | | | +| 6 | `Array` | Rotate Matrix |❌ | | | | | + +
+ +
+
diff --git a/3]. Competitive Programming/.DS_Store b/3]. Competitive Programming/.DS_Store deleted file mode 100644 index f3395e053..000000000 Binary files a/3]. Competitive Programming/.DS_Store and /dev/null differ diff --git a/1]. DSA/1]. Data Structures/01]. Array/Java/Add Contents.txt b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 1/Add Contents.txt similarity index 100% rename from 1]. DSA/1]. Data Structures/01]. Array/Java/Add Contents.txt rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 1/Add Contents.txt diff --git a/1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/Add Contents.txt b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 2/Add Contents.txt similarity index 100% rename from 1]. DSA/1]. Data Structures/13]. Binary Search Tree/C++/Add Contents.txt rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 2/Add Contents.txt diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/BELLA_CIAO.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/BELLA_CIAO.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/BELLA_CIAO.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/BELLA_CIAO.cpp diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/BITWISE_TUPLES.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/BITWISE_TUPLES.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/BITWISE_TUPLES.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/BITWISE_TUPLES.cpp diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/MINIMUM_DUAL_AREA.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/MINIMUM_DUAL_AREA.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/MINIMUM_DUAL_AREA.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/MINIMUM_DUAL_AREA.cpp diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/MINIMUM_SUBTREE_COVER.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/MINIMUM_SUBTREE_COVER.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/MINIMUM_SUBTREE_COVER.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/MINIMUM_SUBTREE_COVER.cpp diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/SHORTEST_ROUTE.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/SHORTEST_ROUTE.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/SHORTEST_ROUTE.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/SHORTEST_ROUTE.cpp diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/SUMMER_HEAT.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/SUMMER_HEAT.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/JUNE_LONG_CHALLENGE_DIV_3/SUMMER_HEAT.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/June/SUMMER_HEAT.cpp diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/ISS.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/ISS.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/ISS.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/ISS.cpp diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/MODEQ.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/MODEQ.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/MODEQ.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/MODEQ.cpp diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/TCTCTOE.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/TCTCTOE.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/TCTCTOE.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/TCTCTOE.cpp diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/THOUSES.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/THOUSES.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/THOUSES.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/THOUSES.cpp diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/VPATH.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/VPATH.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/VPATH.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/VPATH.cpp diff --git a/3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/XOREQUAL.cpp b/3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/XOREQUAL.cpp similarity index 100% rename from 3]. Competitive Programming/CodeChef/1]. Long Challenge/May Long Challenge 2021/XOREQUAL.cpp rename to 3]. Competitive Programming/CodeChef/1]. Long Challenge/Div 3/May/XOREQUAL.cpp diff --git a/1]. DSA/2]. Algorithms/06]. Greedy/Java/Add Contents.txt b/3]. Competitive Programming/CodeChef/2]. Cook-off/Div 1/Add Contents.txt similarity index 100% rename from 1]. DSA/2]. Algorithms/06]. Greedy/Java/Add Contents.txt rename to 3]. Competitive Programming/CodeChef/2]. Cook-off/Div 1/Add Contents.txt diff --git a/3]. Competitive Programming/CodeChef/2]. Cook-off/Div 2/June/_01)_The_Wave.cpp b/3]. Competitive Programming/CodeChef/2]. Cook-off/Div 2/June/_01)_The_Wave.cpp new file mode 100644 index 000000000..51a22500e --- /dev/null +++ b/3]. Competitive Programming/CodeChef/2]. Cook-off/Div 2/June/_01)_The_Wave.cpp @@ -0,0 +1,37 @@ +#include +using namespace std; +#define ll long long +ll MOD = 1e9+7; + +void solve(){ + ll n,q; cin >> n >> q; + vector vec(n); + map mp; + for(ll i=0;i> vec[i]; + mp[vec[i]]++; + } + sort(vec.begin(),vec.end()); + while(q--){ + ll x; cin >> x; + if(mp[x]>0){ + cout << 0 << "\n"; + continue; + } + ll t = lower_bound(vec.begin(),vec.end(),x)-vec.begin(); + ll index = n-t; + if(t%2==0){ + cout << "POSITIVE" << "\n"; + } + else{ + cout << "NEGATIVE" << "\n"; + } + } + return; +} + +int main() { + ios::sync_with_stdio(0); cin.tie(0); + solve(); + return 0; +} \ No newline at end of file diff --git a/3]. Competitive Programming/CodeChef/2]. Cook-off/Div 2/June/_02)_Binary_String_on_Steroids.cpp b/3]. Competitive Programming/CodeChef/2]. Cook-off/Div 2/June/_02)_Binary_String_on_Steroids.cpp new file mode 100644 index 000000000..6e16e0d40 --- /dev/null +++ b/3]. Competitive Programming/CodeChef/2]. Cook-off/Div 2/June/_02)_Binary_String_on_Steroids.cpp @@ -0,0 +1,57 @@ +#include +using namespace std; +#define ll long long +#define pb push_back +ll MOD = 1e9+7; + +void solve(){ + ll n; cin >> n; + string s; cin >> s; + vector vec; + for(ll i=2;i*i<=n;i++){ + if(n%i==0){ + if(i==n/i){ + vec.pb(i); + } + else{ + vec.pb(i); + vec.pb(n/i); + } + } + } + ll one=0,zero=0; + for(ll i=0;i> t; + while(t--){ + solve(); + } + return 0; +} \ No newline at end of file diff --git a/3]. Competitive Programming/CodeChef/2]. Cook-off/Add Contents.txt b/3]. Competitive Programming/CodeChef/2]. Cook-off/Div 3/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/CodeChef/2]. Cook-off/Add Contents.txt rename to 3]. Competitive Programming/CodeChef/2]. Cook-off/Div 3/Add Contents.txt diff --git a/3]. Competitive Programming/CodeChef/3]. Lunch Time/Add Contents.txt b/3]. Competitive Programming/CodeChef/3]. Lunch Time/Div 1/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/CodeChef/3]. Lunch Time/Add Contents.txt rename to 3]. Competitive Programming/CodeChef/3]. Lunch Time/Div 1/Add Contents.txt diff --git a/3]. Competitive Programming/CodeForce/Add Contents.txt b/3]. Competitive Programming/CodeChef/3]. Lunch Time/Div 2/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/CodeForce/Add Contents.txt rename to 3]. Competitive Programming/CodeChef/3]. Lunch Time/Div 2/Add Contents.txt diff --git a/3]. Competitive Programming/HackerRank/C++/Add Contents.txt b/3]. Competitive Programming/CodeChef/3]. Lunch Time/Div 3/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Add Contents.txt rename to 3]. Competitive Programming/CodeChef/3]. Lunch Time/Div 3/Add Contents.txt diff --git a/3]. Competitive Programming/HackerRank/C/Add Contents.txt b/3]. Competitive Programming/CodeForces/1]. Problem Set/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/HackerRank/C/Add Contents.txt rename to 3]. Competitive Programming/CodeForces/1]. Problem Set/Add Contents.txt diff --git a/3]. Competitive Programming/HackerRank/Interview Preparation Kit/Add Contents.txt b/3]. Competitive Programming/CodeForces/1]. Problem Set/Levels/A/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/HackerRank/Interview Preparation Kit/Add Contents.txt rename to 3]. Competitive Programming/CodeForces/1]. Problem Set/Levels/A/Add Contents.txt diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/C++/Add Contents.txt b/3]. Competitive Programming/CodeForces/1]. Problem Set/Levels/B/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/C++/Add Contents.txt rename to 3]. Competitive Programming/CodeForces/1]. Problem Set/Levels/B/Add Contents.txt diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Java/Add Contents.txt b/3]. Competitive Programming/CodeForces/1]. Problem Set/Levels/C/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Java/Add Contents.txt rename to 3]. Competitive Programming/CodeForces/1]. Problem Set/Levels/C/Add Contents.txt diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/C++/Add Contents.txt b/3]. Competitive Programming/CodeForces/1]. Problem Set/Levels/D/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/C++/Add Contents.txt rename to 3]. Competitive Programming/CodeForces/1]. Problem Set/Levels/D/Add Contents.txt diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Java/Add Contents.txt b/3]. Competitive Programming/CodeForces/2]. Contests/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Java/Add Contents.txt rename to 3]. Competitive Programming/CodeForces/2]. Contests/Add Contents.txt diff --git a/3]. Competitive Programming/HackerRank/Python/Add Contents.txt b/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_1/C++/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/HackerRank/Python/Add Contents.txt rename to 3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_1/C++/Add Contents.txt diff --git a/3]. Competitive Programming/LeetCode/Add Contents.txt b/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_1/Java/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/LeetCode/Add Contents.txt rename to 3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_1/Java/Add Contents.txt diff --git a/3]. Competitive Programming/LeetCode/Problems/C++/Add Contents.txt b/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_1/Python/Add Contents.txt similarity index 100% rename from 3]. Competitive Programming/LeetCode/Problems/C++/Add Contents.txt rename to 3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_1/Python/Add Contents.txt diff --git a/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_2/C++/_01)_Arithmetic Array.cpp b/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_2/C++/_01)_Arithmetic Array.cpp new file mode 100644 index 000000000..424514076 --- /dev/null +++ b/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_2/C++/_01)_Arithmetic Array.cpp @@ -0,0 +1,210 @@ +#include +#include +#include +#include +using namespace std; +using namespace __gnu_pbds; + +#define samnoon ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) +#define ll long long int +#define ld long double +#define ull unsigned long long int +#define pii pair < int, int> +#define pll pair < ll, ll> +#define MOD 1000000007 +#define ff first +#define ss second +#define pb push_back +#define eb emplace_back +#define sc scanf +#define pf printf +#define scin(x) scanf("%d",&(x)) +#define scin2(x,y) scanf("%d %d",&(x),&(y)) +#define scin3(x,y,z) scanf("%d %d %d",&(x),&(y),&(z)) +#define scln(x) scanf("%lld",&(x)) +#define scln2(x,y) scanf("%lld %lld",&(x),&(y)) +#define scln3(x,y,z) scanf("%lld %lld %lld",&(x),&(y),&(z)) +#define min3(a,b,c) min(a,min(b,c)) +#define min4(a,b,c,d) min(d,min(a,min(b,c))) +#define max3(a,b,c) max(a,max(b,c)) +#define max4(a,b,c,d) max(d,max(a,max(b,c))) +#define ms(a,b) memset(a,b,sizeof(a)) +#define mp make_pair +#define gcd(a, b) __gcd(a,b) +#define lcm(a, b) ((a)*(b)/gcd(a,b)) +#define input freopen("input.txt","rt", stdin) +#define output freopen("output.txt","wt", stdout) +#define PI acos(-1.0) +#define zero(a) memset(a,0,sizeof a) +#define all(v) v.begin(),v.end() +#define Max(v) *max_element(all(v)) +#define Min(v) *min_element(all(v)) +#define Upper(c,x) (upper_bound(c.begin(),c.end(),x)-c.begin()) +#define Lower(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin()) +#define Unique(X) (X).erase(unique(all(X)),(X).end()) +#define no cout << "NO" << endl ; +#define yes cout << "YES" << endl ; +#define segment_tree int Lnode = node << 1 , Rnode = Lnode + 1 , mid = ( b + e ) >> 1 ; +#define Count(C, x) count(C.begin(), C.end(), x) +///sum accumulate( v.begin(), v.begin() + k, 0LL )///bool operator < ( const Node& p ) const{ return cost < p.cost ; } +///priority_queue,greater >pq;///std::set > Set;///string str = "abcdefghijklmnopqrstuvwxyz";///string s2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ; +///string s = bitset<64>( n ).to_string() ; ll val = bitset< 64 >( s ).to_ullong() ; + +///--------------Graph Moves-------------------------------------- +const int fx[] = {+1,-1,+0,+0}; const int fy[] = {+0,+0,+1,-1}; +///const int fx[] = {+0,+0,+1,-1,-1,+1,-1,+1}; ///King's move ///const int fy[] = {-1,+1,+0,+0,+1,+1,-1,-1}; ///king's Move +///const int fx[] = {-2,-2,-1,-1,+1,+1,+2,+2}; ///knight's move ///const int fy[] = {-1,+1,-2,+2,-2,+2,-1,+1}; ///knight's move +///--------------------------------------------------------------- + + +typedef tree< int, null_type, less, rb_tree_tag,tree_order_statistics_node_update> ordered_set; +typedef tree,null_type,less>,rb_tree_tag,tree_order_statistics_node_update> ordered_multiset; + +/// Modular arithmetic +inline void normal(ll &a) { a %= MOD; (a < 0) && (a += MOD); } +inline ll modMul(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a*b)%MOD; } +inline ll modAdd(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a+b)%MOD; } +inline ll modSub(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); a -= b; normal(a); return a; } +inline ll modPow(ll b, ll p) { ll r = 1; while(p) { if(p&1) r = modMul(r, b); b = modMul(b, b); p >>= 1; } return r; } +inline ll modInverse(ll a) { return modPow(a, MOD-2); } /// When MOD is prime. +inline ll modDiv(ll a, ll b) { return modMul(a, modInverse(b)); } + + + +/** Debugging Tool **/ +#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator _it(_ss); err(_it, args); } +void err(istream_iterator it) {} +template +void err(istream_iterator it, T a, Args... args) +{ + cerr << *it << " = " << a << endl; + err(++it, args...); +} +/// + +///--------------------**********---------------------------------- + +ll compute_hash(string const& s) { + const int p = 31; + const int m = 1e9 + 9; + ll hash_value = 0; + ll p_pow = 1; + for (char c : s) { + hash_value = (hash_value + (c - 'a' + 1) * p_pow) % m; + p_pow = (p_pow * p) % m; + } + return hash_value; +} + +ll binpow(ll a, ll b) +{ + ll res = 1; + while (b > 0) + { + if (b & 1) + res = res * a; + a = a * a; + b >>= 1; + } + return res; +} + + +const ll MAXN = 2e5+10; + +/* +ll pre[MAXN], suf[MAXN]; +void precomputeHashString(const string &s) +{ + string a, b; + ll n = s.size(); + zero(pre); + zero(suf); + for(ll i=0; i=0; i--) + { + b += s[i]; + suf[i] = suf[i + 1] + compute_hash(b); + } +} +bool isPalindrome(const string &s) +{ + precomputeHashString(s); + ll n = s.size(); + ll m = n >> 1; + if(n & 1) + return pre[m + 1] == suf[m]; + return pre[m + 1] == suf[m - 1]; +} +*/ +struct disjoint{ + ll fa[MAXN]; + ll sz[MAXN]; + void Build(ll n) + { + for(ll i = 0; i<=n; i++) fa[i]=i, sz[i] = 1; + } + ll Find(ll x) + { + return x==fa[x]?x:fa[x]=Find(fa[x]); + } + void Union(ll a, ll b) + { + a = Find(a), b = Find(b); + if(sz[a] < sz[b]) swap(a,b); + fa[b] = a; + sz[a] += sz[b]; + } + ll Size(ll n) + { + return sz[n]; + } +}; + + +///--------------------**********---------------------------------- + +///--------------------**********---------------------------------- + +int main() +{ + samnoon; + ll t; + t = 1; + cin >> t; + while(t--) + { + ll n; + cin >> n; + ll a[n]; + ll sum = 0; + for(ll i=0; i> a[i]; + sum += a[i]; + } + if(sum <= 0 || sum < n) + { + cout << 1 << endl; + continue; + } + else + { + cout << sum - n << endl; + } + + } + return 0; +} + +/* stuff you should look for + * int overflow, array bounds + * special cases (n=1?) + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH +*/ diff --git a/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_2/C++/_02)_Bad Boy.cpp b/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_2/C++/_02)_Bad Boy.cpp new file mode 100644 index 000000000..746c02904 --- /dev/null +++ b/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_2/C++/_02)_Bad Boy.cpp @@ -0,0 +1,205 @@ +#include +#include +#include +#include +using namespace std; +using namespace __gnu_pbds; + +#define samnoon ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) +#define ll long long int +#define ld long double +#define ull unsigned long long int +#define pii pair < int, int> +#define pll pair < ll, ll> +#define MOD 1000000007 +#define ff first +#define ss second +#define pb push_back +#define eb emplace_back +#define sc scanf +#define pf printf +#define scin(x) scanf("%d",&(x)) +#define scin2(x,y) scanf("%d %d",&(x),&(y)) +#define scin3(x,y,z) scanf("%d %d %d",&(x),&(y),&(z)) +#define scln(x) scanf("%lld",&(x)) +#define scln2(x,y) scanf("%lld %lld",&(x),&(y)) +#define scln3(x,y,z) scanf("%lld %lld %lld",&(x),&(y),&(z)) +#define min3(a,b,c) min(a,min(b,c)) +#define min4(a,b,c,d) min(d,min(a,min(b,c))) +#define max3(a,b,c) max(a,max(b,c)) +#define max4(a,b,c,d) max(d,max(a,max(b,c))) +#define ms(a,b) memset(a,b,sizeof(a)) +#define mp make_pair +#define gcd(a, b) __gcd(a,b) +#define lcm(a, b) ((a)*(b)/gcd(a,b)) +#define input freopen("input.txt","rt", stdin) +#define output freopen("output.txt","wt", stdout) +#define PI acos(-1.0) +#define zero(a) memset(a,0,sizeof a) +#define all(v) v.begin(),v.end() +#define Max(v) *max_element(all(v)) +#define Min(v) *min_element(all(v)) +#define Upper(c,x) (upper_bound(c.begin(),c.end(),x)-c.begin()) +#define Lower(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin()) +#define Unique(X) (X).erase(unique(all(X)),(X).end()) +#define no cout << "NO" << endl ; +#define yes cout << "YES" << endl ; +#define segment_tree int Lnode = node << 1 , Rnode = Lnode + 1 , mid = ( b + e ) >> 1 ; +#define Count(C, x) count(C.begin(), C.end(), x) +///sum accumulate( v.begin(), v.begin() + k, 0LL )///bool operator < ( const Node& p ) const{ return cost < p.cost ; } +///priority_queue,greater >pq;///std::set > Set;///string str = "abcdefghijklmnopqrstuvwxyz";///string s2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ; +///string s = bitset<64>( n ).to_string() ; ll val = bitset< 64 >( s ).to_ullong() ; + +///--------------Graph Moves-------------------------------------- +const int fx[] = {+1,-1,+0,+0}; const int fy[] = {+0,+0,+1,-1}; +///const int fx[] = {+0,+0,+1,-1,-1,+1,-1,+1}; ///King's move ///const int fy[] = {-1,+1,+0,+0,+1,+1,-1,-1}; ///king's Move +///const int fx[] = {-2,-2,-1,-1,+1,+1,+2,+2}; ///knight's move ///const int fy[] = {-1,+1,-2,+2,-2,+2,-1,+1}; ///knight's move +///--------------------------------------------------------------- + + +typedef tree< int, null_type, less, rb_tree_tag,tree_order_statistics_node_update> ordered_set; +typedef tree,null_type,less>,rb_tree_tag,tree_order_statistics_node_update> ordered_multiset; + +/// Modular arithmetic +inline void normal(ll &a) { a %= MOD; (a < 0) && (a += MOD); } +inline ll modMul(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a*b)%MOD; } +inline ll modAdd(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a+b)%MOD; } +inline ll modSub(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); a -= b; normal(a); return a; } +inline ll modPow(ll b, ll p) { ll r = 1; while(p) { if(p&1) r = modMul(r, b); b = modMul(b, b); p >>= 1; } return r; } +inline ll modInverse(ll a) { return modPow(a, MOD-2); } /// When MOD is prime. +inline ll modDiv(ll a, ll b) { return modMul(a, modInverse(b)); } + + + +/** Debugging Tool **/ +#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator _it(_ss); err(_it, args); } +void err(istream_iterator it) {} +template +void err(istream_iterator it, T a, Args... args) +{ + cerr << *it << " = " << a << endl; + err(++it, args...); +} +/// + +///--------------------**********---------------------------------- + +ll compute_hash(string const& s) { + const int p = 31; + const int m = 1e9 + 9; + ll hash_value = 0; + ll p_pow = 1; + for (char c : s) { + hash_value = (hash_value + (c - 'a' + 1) * p_pow) % m; + p_pow = (p_pow * p) % m; + } + return hash_value; +} + +ll binpow(ll a, ll b) +{ + ll res = 1; + while (b > 0) + { + if (b & 1) + res = res * a; + a = a * a; + b >>= 1; + } + return res; +} + + +const ll MAXN = 2e5+10; + +/* +ll pre[MAXN], suf[MAXN]; +void precomputeHashString(const string &s) +{ + string a, b; + ll n = s.size(); + zero(pre); + zero(suf); + for(ll i=0; i=0; i--) + { + b += s[i]; + suf[i] = suf[i + 1] + compute_hash(b); + } +} +bool isPalindrome(const string &s) +{ + precomputeHashString(s); + ll n = s.size(); + ll m = n >> 1; + if(n & 1) + return pre[m + 1] == suf[m]; + return pre[m + 1] == suf[m - 1]; +} +*/ +struct disjoint{ + ll fa[MAXN]; + ll sz[MAXN]; + void Build(ll n) + { + for(ll i = 0; i<=n; i++) fa[i]=i, sz[i] = 1; + } + ll Find(ll x) + { + return x==fa[x]?x:fa[x]=Find(fa[x]); + } + void Union(ll a, ll b) + { + a = Find(a), b = Find(b); + if(sz[a] < sz[b]) swap(a,b); + fa[b] = a; + sz[a] += sz[b]; + } + ll Size(ll n) + { + return sz[n]; + } +}; + + +///--------------------**********---------------------------------- + +///--------------------**********---------------------------------- + +int main() +{ + samnoon; + ll t; + t = 1; + cin >> t; + while(t--) + { + ll n, m, x, y; + cin >> n >> m >> x >> y; + if(x == 1 && y == 1) + { + cout << n << ' ' << m << ' ' << n << ' ' << m << endl; + } + else if(x == n && y == m) + { + cout << 1 << ' ' << 1 << ' ' << 1 << ' ' << 1 << endl; + } + else + { + cout << 1 << ' ' << 1 << ' ' << n << ' ' << m << endl; + } + } + return 0; +} + +/* stuff you should look for + * int overflow, array bounds + * special cases (n=1?) + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH +*/ diff --git a/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_2/C++/_03)_Challenging Cliffs.cpp b/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_2/C++/_03)_Challenging Cliffs.cpp new file mode 100644 index 000000000..011912514 --- /dev/null +++ b/3]. Competitive Programming/CodeForces/2]. Contests/Rounds/726/Div_2/C++/_03)_Challenging Cliffs.cpp @@ -0,0 +1,60 @@ +#include + +using namespace std; + +#ifdef LOCAL +#include "rfd_wrap.h" +#else +#define fap(...) 0 +#endif + +typedef long long ll; +typedef pair pii; + +#define bt(x) (1LL << (x)) +#define all(x) (x).begin(), (x).end() +#define FastIO ios::sync_with_stdio(false); cin.tie(0); + +const int inf = 0x3f3f3f3f; +const ll INF = 2e18; + +auto prep(auto a, int p) { + auto ret = a; + ret.clear(); + ret.push_back(a[p+1]); + for(int i=p+2; i<(int) a.size(); ++i) ret.push_back(a[i]); + for(int i=0; i> t; + + while(t--) { + int n; + cin >> n; + + vector a(n); + for(int& x : a) cin >> x; + sort(all(a)); + + if(n > 2) { + int idx = 0, best = inf; + for(int i=0; i+1 +#include +#include +using namespace std; +using namespace __gnu_pbds; + +#define ll long long int +#define pb push_back +#define mp make_pair +#define all(x) x.begin(),x.end() +#define Max 100000000000000 +#define min_heap priority_queue , greater > + +template +using ordered_set = tree, rb_tree_tag, tree_order_statistics_node_update>; + +int main() +{ + + ll t; + cin>>t; + + while(t--){ + ll n; + cin>>n; + + if(n%2) cout<<"Bob"< +#include +#include +#include + +int main() + + { char name[1000],i; + gets(name); + printf("Hello, World!\n"); + puts(name); + + } \ No newline at end of file diff --git a/3]. Competitive Programming/HackerRank/01]. C/INTRODUCTION/_03)_Functions_in_C.c b/3]. Competitive Programming/HackerRank/01]. C/INTRODUCTION/_03)_Functions_in_C.c new file mode 100644 index 000000000..2b36a3731 --- /dev/null +++ b/3]. Competitive Programming/HackerRank/01]. C/INTRODUCTION/_03)_Functions_in_C.c @@ -0,0 +1,73 @@ +#include +/* +Add `int max_of_four(int a, int b, int c, int d)` here. +*/ + +int main() +{ + int a, b, c, d,y; + scanf("%d\n",&a); + scanf("%d\n",&b); + scanf("%d\n",&c); + scanf("%d",&d); + + if (a>b && a>c && a>d){ + if (ba && b>c && b>d) { + if (aa && c>b && c>d) + { + if (aa && d>b && d>c) { + if (a +#include +#include +#include + +int main() +{ + + char ch; + char stri[100],sent[10000]; + scanf("%c\n",&ch); + gets(stri); + gets(sent); + + printf("%c\n",ch); + puts(stri); + puts(sent); + + + return 0; +} + diff --git a/3]. Competitive Programming/HackerRank/01]. C/INTRODUCTION/_04)_Sum_and_Difference_of_Two_Numbers.c b/3]. Competitive Programming/HackerRank/01]. C/INTRODUCTION/_04)_Sum_and_Difference_of_Two_Numbers.c new file mode 100644 index 000000000..5b8f9ac31 --- /dev/null +++ b/3]. Competitive Programming/HackerRank/01]. C/INTRODUCTION/_04)_Sum_and_Difference_of_Two_Numbers.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include + +int main() +{ + int a,b,e,f; + float c,d,g,h; + scanf("%d %d",&a,&b); + scanf("%f %f",&c,&d); + e=a+b; + f=a-b; + g=c+d; + h=c-d; + printf("%d %d\n",e,f); + printf("%.1f %.1f",g,h); + return 0; +} + diff --git a/3]. Competitive Programming/HackerRank/01]. C/INTRODUCTION/_05)_Pointers_in_C.c b/3]. Competitive Programming/HackerRank/01]. C/INTRODUCTION/_05)_Pointers_in_C.c new file mode 100644 index 000000000..a390e11c2 --- /dev/null +++ b/3]. Competitive Programming/HackerRank/01]. C/INTRODUCTION/_05)_Pointers_in_C.c @@ -0,0 +1,24 @@ +#include + +void update(int *a,int *b) { + // Complete this function +} + +int main() { + int a, b,c,d; + + scanf("%d", &a); + scanf("%d", &b); + c=a+b; + d=a-b; + printf("%d\n",c); + if(d<0){ + d=-1*d; + printf("%d",d); + } + else + printf("%d",d); + + return 0; +} + diff --git a/3]. Competitive Programming/HackerRank/C++/.DS_Store b/3]. Competitive Programming/HackerRank/02]. C++/.DS_Store similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/.DS_Store rename to 3]. Competitive Programming/HackerRank/02]. C++/.DS_Store diff --git a/3]. Competitive Programming/HackerRank/02]. C++/Add Contents.txt b/3]. Competitive Programming/HackerRank/02]. C++/Add Contents.txt new file mode 100644 index 000000000..e69de29bb diff --git a/3]. Competitive Programming/HackerRank/C++/Classes/.DS_Store b/3]. Competitive Programming/HackerRank/02]. C++/Classes/.DS_Store similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Classes/.DS_Store rename to 3]. Competitive Programming/HackerRank/02]. C++/Classes/.DS_Store diff --git a/3]. Competitive Programming/HackerRank/C++/Classes/_13)_Class.cpp b/3]. Competitive Programming/HackerRank/02]. C++/Classes/_13)_Class.cpp similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Classes/_13)_Class.cpp rename to 3]. Competitive Programming/HackerRank/02]. C++/Classes/_13)_Class.cpp diff --git a/3]. Competitive Programming/HackerRank/C++/Introduction/.DS_Store b/3]. Competitive Programming/HackerRank/02]. C++/Introduction/.DS_Store similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Introduction/.DS_Store rename to 3]. Competitive Programming/HackerRank/02]. C++/Introduction/.DS_Store diff --git a/3]. Competitive Programming/HackerRank/C++/Introduction/_01)_Hello_World.cpp b/3]. Competitive Programming/HackerRank/02]. C++/Introduction/_01)_Hello_World.cpp similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Introduction/_01)_Hello_World.cpp rename to 3]. Competitive Programming/HackerRank/02]. C++/Introduction/_01)_Hello_World.cpp diff --git a/3]. Competitive Programming/HackerRank/C++/Introduction/_02)_Input_and_Output.cpp b/3]. Competitive Programming/HackerRank/02]. C++/Introduction/_02)_Input_and_Output.cpp similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Introduction/_02)_Input_and_Output.cpp rename to 3]. Competitive Programming/HackerRank/02]. C++/Introduction/_02)_Input_and_Output.cpp diff --git a/3]. Competitive Programming/HackerRank/C++/Introduction/_03)_Basic_Data_Types.cpp b/3]. Competitive Programming/HackerRank/02]. C++/Introduction/_03)_Basic_Data_Types.cpp similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Introduction/_03)_Basic_Data_Types.cpp rename to 3]. Competitive Programming/HackerRank/02]. C++/Introduction/_03)_Basic_Data_Types.cpp diff --git a/3]. Competitive Programming/HackerRank/C++/Introduction/_04)_Conditional_Statements.cpp b/3]. Competitive Programming/HackerRank/02]. C++/Introduction/_04)_Conditional_Statements.cpp similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Introduction/_04)_Conditional_Statements.cpp rename to 3]. Competitive Programming/HackerRank/02]. C++/Introduction/_04)_Conditional_Statements.cpp diff --git a/3]. Competitive Programming/HackerRank/C++/Introduction/_05)_For_Loop.cpp b/3]. Competitive Programming/HackerRank/02]. C++/Introduction/_05)_For_Loop.cpp similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Introduction/_05)_For_Loop.cpp rename to 3]. Competitive Programming/HackerRank/02]. C++/Introduction/_05)_For_Loop.cpp diff --git a/3]. Competitive Programming/HackerRank/C++/Introduction/_06_Functions.cpp b/3]. Competitive Programming/HackerRank/02]. C++/Introduction/_06_Functions.cpp similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Introduction/_06_Functions.cpp rename to 3]. Competitive Programming/HackerRank/02]. C++/Introduction/_06_Functions.cpp diff --git a/3]. Competitive Programming/HackerRank/C++/Introduction/_07)_Pointer.cpp b/3]. Competitive Programming/HackerRank/02]. C++/Introduction/_07)_Pointer.cpp similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Introduction/_07)_Pointer.cpp rename to 3]. Competitive Programming/HackerRank/02]. C++/Introduction/_07)_Pointer.cpp diff --git a/3]. Competitive Programming/HackerRank/C++/Introduction/_08)_Arrays_Introduction.cpp b/3]. Competitive Programming/HackerRank/02]. C++/Introduction/_08)_Arrays_Introduction.cpp similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Introduction/_08)_Arrays_Introduction.cpp rename to 3]. Competitive Programming/HackerRank/02]. C++/Introduction/_08)_Arrays_Introduction.cpp diff --git a/3]. Competitive Programming/HackerRank/C++/Introduction/_09)_Variable_Sized_Arrays.cpp b/3]. Competitive Programming/HackerRank/02]. C++/Introduction/_09)_Variable_Sized_Arrays.cpp similarity index 100% rename from 3]. Competitive Programming/HackerRank/C++/Introduction/_09)_Variable_Sized_Arrays.cpp rename to 3]. Competitive Programming/HackerRank/02]. C++/Introduction/_09)_Variable_Sized_Arrays.cpp diff --git a/3]. Competitive Programming/HackerRank/03]. Python/Add Contents.txt b/3]. Competitive Programming/HackerRank/03]. Python/Add Contents.txt new file mode 100644 index 000000000..e69de29bb diff --git a/3]. Competitive Programming/HackerRank/03]. Python/Introduction/01-Say Hello World.py b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/01-Say Hello World.py new file mode 100644 index 000000000..b6a125fed --- /dev/null +++ b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/01-Say Hello World.py @@ -0,0 +1 @@ +print ("Hello, World!") diff --git a/3]. Competitive Programming/HackerRank/03]. Python/Introduction/02-Python If-Else.py b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/02-Python If-Else.py new file mode 100644 index 000000000..ebd9702fb --- /dev/null +++ b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/02-Python If-Else.py @@ -0,0 +1,4 @@ +if __name__ == '__main__': + n = int(input().strip()) + + print("Weird" if n % 2 or 6 <= n <= 20 else "Not Weird") diff --git a/3]. Competitive Programming/HackerRank/03]. Python/Introduction/03-Arithmetic Operators.py b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/03-Arithmetic Operators.py new file mode 100644 index 000000000..0f449bbcb --- /dev/null +++ b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/03-Arithmetic Operators.py @@ -0,0 +1,5 @@ +if __name__ == '__main__': + a = int(input()) + b = int(input()) + +print ("%d\n%d\n%d\n"%(a+b,a-b,a*b)) diff --git a/3]. Competitive Programming/HackerRank/03]. Python/Introduction/04-Division.py b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/04-Division.py new file mode 100644 index 000000000..8adcc2105 --- /dev/null +++ b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/04-Division.py @@ -0,0 +1,6 @@ +if __name__ == '__main__': + a = int(input()) + b = int(input()) + +print(a//b) +print(a/b) diff --git a/3]. Competitive Programming/HackerRank/03]. Python/Introduction/05-Division.py b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/05-Division.py new file mode 100644 index 000000000..f97f4dd13 --- /dev/null +++ b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/05-Division.py @@ -0,0 +1,6 @@ +if __name__ == '__main__': + n = int(input()) + +for i in range (n): + if i>=0 and i<=20: + print(i**2) diff --git a/3]. Competitive Programming/HackerRank/03]. Python/Introduction/06-Loops.py b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/06-Loops.py new file mode 100644 index 000000000..f97f4dd13 --- /dev/null +++ b/3]. Competitive Programming/HackerRank/03]. Python/Introduction/06-Loops.py @@ -0,0 +1,6 @@ +if __name__ == '__main__': + n = int(input()) + +for i in range (n): + if i>=0 and i<=20: + print(i**2) diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_01)_Welcome_To_Java.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_01)_Welcome_To_Java.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_01)_Welcome_To_Java.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_01)_Welcome_To_Java.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_02)_Java_Stdin_And_Stdout_I.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_02)_Java_Stdin_And_Stdout_I.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_02)_Java_Stdin_And_Stdout_I.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_02)_Java_Stdin_And_Stdout_I.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_03)_Java_Stdin_And_Stdout_II.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_03)_Java_Stdin_And_Stdout_II.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_03)_Java_Stdin_And_Stdout_II.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_03)_Java_Stdin_And_Stdout_II.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_04)_Java_If_Else.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_04)_Java_If_Else.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_04)_Java_If_Else.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_04)_Java_If_Else.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_05)_Java_Output_Formatting.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_05)_Java_Output_Formatting.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_05)_Java_Output_Formatting.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_05)_Java_Output_Formatting.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_06)_Java_Loops_I.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_06)_Java_Loops_I.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_06)_Java_Loops_I.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_06)_Java_Loops_I.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_07)_Java_Loops_II.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_07)_Java_Loops_II.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_07)_Java_Loops_II.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_07)_Java_Loops_II.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_08)_Java_Datatypes.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_08)_Java_Datatypes.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_08)_Java_Datatypes.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_08)_Java_Datatypes.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_09)_Java_End_Of_File.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_09)_Java_End_Of_File.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_09)_Java_End_Of_File.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_09)_Java_End_Of_File.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_10)_Java_Static_Initializer_Block.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_10)_Java_Static_Initializer_Block.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_10)_Java_Static_Initializer_Block.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_10)_Java_Static_Initializer_Block.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_11)_Java_Int_To_String.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_11)_Java_Int_To_String.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_11)_Java_Int_To_String.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_11)_Java_Int_To_String.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_12)_Java_Date_And_Time.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_12)_Java_Date_And_Time.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_12)_Java_Date_And_Time.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_12)_Java_Date_And_Time.java diff --git a/3]. Competitive Programming/HackerRank/Java/introduction/_13)_Java_Currency_Formatter.java b/3]. Competitive Programming/HackerRank/04]. Java/Introduction/_13)_Java_Currency_Formatter.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/introduction/_13)_Java_Currency_Formatter.java rename to 3]. Competitive Programming/HackerRank/04]. Java/Introduction/_13)_Java_Currency_Formatter.java diff --git a/3]. Competitive Programming/HackerRank/Java/oop/_01)_Java_Inheritance_I.java b/3]. Competitive Programming/HackerRank/04]. Java/OOP/_01)_Java_Inheritance_I.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/oop/_01)_Java_Inheritance_I.java rename to 3]. Competitive Programming/HackerRank/04]. Java/OOP/_01)_Java_Inheritance_I.java diff --git a/3]. Competitive Programming/HackerRank/Java/oop/_02)_Java_Inheritance_II.java b/3]. Competitive Programming/HackerRank/04]. Java/OOP/_02)_Java_Inheritance_II.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/oop/_02)_Java_Inheritance_II.java rename to 3]. Competitive Programming/HackerRank/04]. Java/OOP/_02)_Java_Inheritance_II.java diff --git a/3]. Competitive Programming/HackerRank/Java/oop/_03)_Java_Abstract_Class.java b/3]. Competitive Programming/HackerRank/04]. Java/OOP/_03)_Java_Abstract_Class.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/oop/_03)_Java_Abstract_Class.java rename to 3]. Competitive Programming/HackerRank/04]. Java/OOP/_03)_Java_Abstract_Class.java diff --git a/3]. Competitive Programming/HackerRank/Java/oop/_04)_Java_Interface.java b/3]. Competitive Programming/HackerRank/04]. Java/OOP/_04)_Java_Interface.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/oop/_04)_Java_Interface.java rename to 3]. Competitive Programming/HackerRank/04]. Java/OOP/_04)_Java_Interface.java diff --git a/3]. Competitive Programming/HackerRank/Java/oop/_05)_Java_Method_Overriding.java b/3]. Competitive Programming/HackerRank/04]. Java/OOP/_05)_Java_Method_Overriding.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/oop/_05)_Java_Method_Overriding.java rename to 3]. Competitive Programming/HackerRank/04]. Java/OOP/_05)_Java_Method_Overriding.java diff --git a/3]. Competitive Programming/HackerRank/Java/oop/_06)_Java_Method_Overriding_2_SuperKeyword.java b/3]. Competitive Programming/HackerRank/04]. Java/OOP/_06)_Java_Method_Overriding_2_SuperKeyword.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/oop/_06)_Java_Method_Overriding_2_SuperKeyword.java rename to 3]. Competitive Programming/HackerRank/04]. Java/OOP/_06)_Java_Method_Overriding_2_SuperKeyword.java diff --git a/3]. Competitive Programming/HackerRank/Java/oop/_07)_Java_Instance_of_keyword.java b/3]. Competitive Programming/HackerRank/04]. Java/OOP/_07)_Java_Instance_of_keyword.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/oop/_07)_Java_Instance_of_keyword.java rename to 3]. Competitive Programming/HackerRank/04]. Java/OOP/_07)_Java_Instance_of_keyword.java diff --git a/3]. Competitive Programming/HackerRank/Java/oop/_08)_Java_Iterator.java b/3]. Competitive Programming/HackerRank/04]. Java/OOP/_08)_Java_Iterator.java similarity index 100% rename from 3]. Competitive Programming/HackerRank/Java/oop/_08)_Java_Iterator.java rename to 3]. Competitive Programming/HackerRank/04]. Java/OOP/_08)_Java_Iterator.java diff --git a/3]. Competitive Programming/HackerRank/SQL/01). HackerRank [SQL-Problem (BASIC-SELECT)]/__1-8__Easy-SELECT.sql b/3]. Competitive Programming/HackerRank/05]. SQL/01). HackerRank [SQL-Problem (BASIC-SELECT)]/__1-8__Easy-SELECT.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/01). HackerRank [SQL-Problem (BASIC-SELECT)]/__1-8__Easy-SELECT.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/01). HackerRank [SQL-Problem (BASIC-SELECT)]/__1-8__Easy-SELECT.sql diff --git a/3]. Competitive Programming/HackerRank/SQL/02). HackerRank [SQL-Problem (BASIC-SELECT)]/__9-14__Easy-SELECT.sql b/3]. Competitive Programming/HackerRank/05]. SQL/02). HackerRank [SQL-Problem (BASIC-SELECT)]/__9-14__Easy-SELECT.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/02). HackerRank [SQL-Problem (BASIC-SELECT)]/__9-14__Easy-SELECT.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/02). HackerRank [SQL-Problem (BASIC-SELECT)]/__9-14__Easy-SELECT.sql diff --git a/3]. Competitive Programming/HackerRank/SQL/03). HackerRank [SQL-Problem (BASIC-SELECT)]/__15-20__Easy-SELECT.sql b/3]. Competitive Programming/HackerRank/05]. SQL/03). HackerRank [SQL-Problem (BASIC-SELECT)]/__15-20__Easy-SELECT.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/03). HackerRank [SQL-Problem (BASIC-SELECT)]/__15-20__Easy-SELECT.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/03). HackerRank [SQL-Problem (BASIC-SELECT)]/__15-20__Easy-SELECT.sql diff --git a/3]. Competitive Programming/HackerRank/SQL/04). HackerRank [SQL-Problem (ADVANCED-SELECT)]/__21-23__Advanced-SELECT.sql b/3]. Competitive Programming/HackerRank/05]. SQL/04). HackerRank [SQL-Problem (ADVANCED-SELECT)]/__21-23__Advanced-SELECT.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/04). HackerRank [SQL-Problem (ADVANCED-SELECT)]/__21-23__Advanced-SELECT.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/04). HackerRank [SQL-Problem (ADVANCED-SELECT)]/__21-23__Advanced-SELECT.sql diff --git a/3]. Competitive Programming/HackerRank/SQL/05). HackerRank [SQL-Problem (ADVANCED-SELECT)]/__24-27__Advanced-SELECT.sql b/3]. Competitive Programming/HackerRank/05]. SQL/05). HackerRank [SQL-Problem (ADVANCED-SELECT)]/__24-27__Advanced-SELECT.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/05). HackerRank [SQL-Problem (ADVANCED-SELECT)]/__24-27__Advanced-SELECT.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/05). HackerRank [SQL-Problem (ADVANCED-SELECT)]/__24-27__Advanced-SELECT.sql diff --git a/3]. Competitive Programming/HackerRank/SQL/06). HackerRank [SQL-Problem (AGGREGATION)]/__28-34__AGGREGATION.sql b/3]. Competitive Programming/HackerRank/05]. SQL/06). HackerRank [SQL-Problem (AGGREGATION)]/__28-34__AGGREGATION.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/06). HackerRank [SQL-Problem (AGGREGATION)]/__28-34__AGGREGATION.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/06). HackerRank [SQL-Problem (AGGREGATION)]/__28-34__AGGREGATION.sql diff --git a/3]. Competitive Programming/HackerRank/SQL/07). HackerRank [SQL-Problem (AGGREGATION)]/__35-40__AGGREGATION.sql b/3]. Competitive Programming/HackerRank/05]. SQL/07). HackerRank [SQL-Problem (AGGREGATION)]/__35-40__AGGREGATION.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/07). HackerRank [SQL-Problem (AGGREGATION)]/__35-40__AGGREGATION.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/07). HackerRank [SQL-Problem (AGGREGATION)]/__35-40__AGGREGATION.sql diff --git a/3]. Competitive Programming/HackerRank/SQL/08). HackerRank [SQL-Problem (AGGREGATION + BASIC-JOIN)]/__41-45__AGGREGATION___Basic_Join.sql b/3]. Competitive Programming/HackerRank/05]. SQL/08). HackerRank [SQL-Problem (AGGREGATION + BASIC-JOIN)]/__41-45__AGGREGATION___Basic_Join.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/08). HackerRank [SQL-Problem (AGGREGATION + BASIC-JOIN)]/__41-45__AGGREGATION___Basic_Join.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/08). HackerRank [SQL-Problem (AGGREGATION + BASIC-JOIN)]/__41-45__AGGREGATION___Basic_Join.sql diff --git a/3]. Competitive Programming/HackerRank/SQL/09). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__46-50__ADAVANCED_JOIN.sql b/3]. Competitive Programming/HackerRank/05]. SQL/09). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__46-50__ADAVANCED_JOIN.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/09). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__46-50__ADAVANCED_JOIN.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/09). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__46-50__ADAVANCED_JOIN.sql diff --git a/3]. Competitive Programming/HackerRank/SQL/10). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__51__HARD_ADAVANCED_JOIN.sql b/3]. Competitive Programming/HackerRank/05]. SQL/10). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__51__HARD_ADAVANCED_JOIN.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/10). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__51__HARD_ADAVANCED_JOIN.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/10). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__51__HARD_ADAVANCED_JOIN.sql diff --git a/3]. Competitive Programming/HackerRank/SQL/11). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__52__HARD_ADAVANCED_JOIN.sql b/3]. Competitive Programming/HackerRank/05]. SQL/11). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__52__HARD_ADAVANCED_JOIN.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/11). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__52__HARD_ADAVANCED_JOIN.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/11). HackerRank [SQL-Problem (ADVANCED-JOIN)]/__52__HARD_ADAVANCED_JOIN.sql diff --git a/3]. Competitive Programming/HackerRank/SQL/12). HackerRank [SQL-Problem (Alternative_Queries)]/__53-55_Alternative_Queries.sql b/3]. Competitive Programming/HackerRank/05]. SQL/12). HackerRank [SQL-Problem (Alternative_Queries)]/__53-55_Alternative_Queries.sql similarity index 100% rename from 3]. Competitive Programming/HackerRank/SQL/12). HackerRank [SQL-Problem (Alternative_Queries)]/__53-55_Alternative_Queries.sql rename to 3]. Competitive Programming/HackerRank/05]. SQL/12). HackerRank [SQL-Problem (Alternative_Queries)]/__53-55_Alternative_Queries.sql diff --git a/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/C++/Add Contents.txt b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/C++/Add Contents.txt new file mode 100644 index 000000000..e69de29bb diff --git a/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Java/Add Contents.txt b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Java/Add Contents.txt new file mode 100644 index 000000000..e69de29bb diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Bit Manipulation/_46) Lonely Integer.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Bit Manipulation/_46) Lonely Integer.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Bit Manipulation/_46) Lonely Integer.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Bit Manipulation/_46) Lonely Integer.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Greedy/_47) Marc's Cakewalk.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Greedy/_47) Marc's Cakewalk.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Greedy/_47) Marc's Cakewalk.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Greedy/_47) Marc's Cakewalk.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_02) ACM ICPC Team.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_02) ACM ICPC Team.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_02) ACM ICPC Team.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_02) ACM ICPC Team.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_04) Angry Professor.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_04) Angry Professor.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_04) Angry Professor.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_04) Angry Professor.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_05) Append and Delete.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_05) Append and Delete.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_05) Append and Delete.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_05) Append and Delete.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_06) Apple and Orange.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_06) Apple and Orange.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_06) Apple and Orange.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_06) Apple and Orange.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_07) Beautiful Days at the Movies.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_07) Beautiful Days at the Movies.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_07) Beautiful Days at the Movies.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_07) Beautiful Days at the Movies.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_08) Between Two Sets.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_08) Between Two Sets.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_08) Between Two Sets.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_08) Between Two Sets.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_10) Bill Division.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_10) Bill Division.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_10) Bill Division.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_10) Bill Division.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_12) Breaking the Records.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_12) Breaking the Records.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_12) Breaking the Records.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_12) Breaking the Records.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_15) Cats and a Mouse.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_15) Cats and a Mouse.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_15) Cats and a Mouse.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_15) Cats and a Mouse.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_16) Chocolate Feast.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_16) Chocolate Feast.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_16) Chocolate Feast.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_16) Chocolate Feast.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_17) Circular Array Rotation.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_17) Circular Array Rotation.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_17) Circular Array Rotation.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_17) Circular Array Rotation.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_18) Climbing the Leaderboard.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_18) Climbing the Leaderboard.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_18) Climbing the Leaderboard.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_18) Climbing the Leaderboard.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_23) Counting Valleys.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_23) Counting Valleys.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_23) Counting Valleys.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_23) Counting Valleys.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_24) Cut the sticks.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_24) Cut the sticks.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_24) Cut the sticks.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_24) Cut the sticks.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_25) Day of the Programmer.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_25) Day of the Programmer.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_25) Day of the Programmer.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_25) Day of the Programmer.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_26) Designer PDF Viewer.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_26) Designer PDF Viewer.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_26) Designer PDF Viewer.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_26) Designer PDF Viewer.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_28) Divisible Sum Pairs.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_28) Divisible Sum Pairs.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_28) Divisible Sum Pairs.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_28) Divisible Sum Pairs.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_29) Drawing Book.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_29) Drawing Book.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_29) Drawing Book.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_29) Drawing Book.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_30) Electronics Shop.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_30) Electronics Shop.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_30) Electronics Shop.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_30) Electronics Shop.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_31) Equalize the Array.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_31) Equalize the Array.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_31) Equalize the Array.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_31) Equalize the Array.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_32) Extra Long Factorials.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_32) Extra Long Factorials.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_32) Extra Long Factorials.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_32) Extra Long Factorials.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_33) Find Digits.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_33) Find Digits.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_33) Find Digits.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_33) Find Digits.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_37) Grading Students.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_37) Grading Students.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_37) Grading Students.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_37) Grading Students.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_38) Halloween Sale.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_38) Halloween Sale.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_38) Halloween Sale.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_38) Halloween Sale.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_43) Jumping on the Clouds Revisited.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_43) Jumping on the Clouds Revisited.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_43) Jumping on the Clouds Revisited.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_43) Jumping on the Clouds Revisited.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_44) Jumping on the Clouds.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_44) Jumping on the Clouds.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_44) Jumping on the Clouds.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_44) Jumping on the Clouds.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_45) Library Fine.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_45) Library Fine.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_45) Library Fine.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_45) Library Fine.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_49) Migratory Birds.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_49) Migratory Birds.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_49) Migratory Birds.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_49) Migratory Birds.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_51) Minimum Distances.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_51) Minimum Distances.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_51) Minimum Distances.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_51) Minimum Distances.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_52) Modified Kaprekar Numbers.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_52) Modified Kaprekar Numbers.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_52) Modified Kaprekar Numbers.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_52) Modified Kaprekar Numbers.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_53) Number Line Jumps.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_53) Number Line Jumps.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_53) Number Line Jumps.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_53) Number Line Jumps.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_56) Picking Numbers.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_56) Picking Numbers.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_56) Picking Numbers.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_56) Picking Numbers.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_59) Repeated String.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_59) Repeated String.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_59) Repeated String.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_59) Repeated String.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_61) Sales by Match.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_61) Sales by Match.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_61) Sales by Match.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_61) Sales by Match.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_62) Save the Prisoner!.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_62) Save the Prisoner!.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_62) Save the Prisoner!.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_62) Save the Prisoner!.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_63) Sequence Equation.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_63) Sequence Equation.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_63) Sequence Equation.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_63) Sequence Equation.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_64) Service Lane.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_64) Service Lane.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_64) Service Lane.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_64) Service Lane.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_65) Sherlock and Squares.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_65) Sherlock and Squares.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_65) Sherlock and Squares.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_65) Sherlock and Squares.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_71) Subarray Division.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_71) Subarray Division.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_71) Subarray Division.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_71) Subarray Division.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_73) Taum and B'day.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_73) Taum and B'day.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_73) Taum and B'day.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_73) Taum and B'day.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_74) The Hurdle Race.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_74) The Hurdle Race.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_74) The Hurdle Race.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_74) The Hurdle Race.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_78) Utopian Tree.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_78) Utopian Tree.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_78) Utopian Tree.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_78) Utopian Tree.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_79) Viral Advertising.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_79) Viral Advertising.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Implementation/_79) Viral Advertising.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Implementation/_79) Viral Advertising.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Search/_39) Ice Cream Parlor.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Search/_39) Ice Cream Parlor.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Search/_39) Ice Cream Parlor.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Search/_39) Ice Cream Parlor.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Search/_54) Pairs.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Search/_54) Pairs.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Search/_54) Pairs.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Search/_54) Pairs.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_09) Big Sorting.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_09) Big Sorting.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_09) Big Sorting.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_09) Big Sorting.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_20) Correctness and the Loop Invariant.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_20) Correctness and the Loop Invariant.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_20) Correctness and the Loop Invariant.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_20) Correctness and the Loop Invariant.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_21) Counting Sort 1.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_21) Counting Sort 1.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_21) Counting Sort 1.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_21) Counting Sort 1.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_22) Counting Sort 2.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_22) Counting Sort 2.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_22) Counting Sort 2.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_22) Counting Sort 2.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_34) Find the Median.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_34) Find the Median.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_34) Find the Median.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_34) Find the Median.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_40) Insertion Sort - Part 1.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_40) Insertion Sort - Part 1.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_40) Insertion Sort - Part 1.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_40) Insertion Sort - Part 1.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_41) Insertion Sort - Part 2.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_41) Insertion Sort - Part 2.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_41) Insertion Sort - Part 2.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_41) Insertion Sort - Part 2.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_42) Intro to Tutorial Challenges.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_42) Intro to Tutorial Challenges.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_42) Intro to Tutorial Challenges.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_42) Intro to Tutorial Challenges.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_58) Quicksort 1 - Partition.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_58) Quicksort 1 - Partition.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_58) Quicksort 1 - Partition.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_58) Quicksort 1 - Partition.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_60) Running Time of Algorithms.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_60) Running Time of Algorithms.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Sorting/_60) Running Time of Algorithms.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Sorting/_60) Running Time of Algorithms.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_03) Alternating Characters.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_03) Alternating Characters.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_03) Alternating Characters.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_03) Alternating Characters.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_13) Caesar Cipher.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_13) Caesar Cipher.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_13) Caesar Cipher.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_13) Caesar Cipher.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_14) CamelCase.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_14) CamelCase.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_14) CamelCase.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_14) CamelCase.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_35) Funny String.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_35) Funny String.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_35) Funny String.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_35) Funny String.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_36) Gemstones.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_36) Gemstones.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_36) Gemstones.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_36) Gemstones.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_48) Mars Exploration.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_48) Mars Exploration.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_48) Mars Exploration.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_48) Mars Exploration.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_55) Pangrams.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_55) Pangrams.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_55) Pangrams.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_55) Pangrams.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_69) String Construction.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_69) String Construction.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_69) String Construction.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_69) String Construction.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_70) Strong Password.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_70) Strong Password.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_70) Strong Password.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_70) Strong Password.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_72) Super Reduced String.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_72) Super Reduced String.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_72) Super Reduced String.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_72) Super Reduced String.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_75) The Love-Letter Mystery.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_75) The Love-Letter Mystery.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_75) The Love-Letter Mystery.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_75) The Love-Letter Mystery.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_77) Two Strings.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_77) Two Strings.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Strings/_77) Two Strings.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Strings/_77) Two Strings.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_01) A Very Big Sum.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_01) A Very Big Sum.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_01) A Very Big Sum.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_01) A Very Big Sum.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_11) Birthday Cake Candles.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_11) Birthday Cake Candles.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_11) Birthday Cake Candles.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_11) Birthday Cake Candles.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_19) Compare the Triplets.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_19) Compare the Triplets.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_19) Compare the Triplets.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_19) Compare the Triplets.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_27) Diagonal Difference.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_27) Diagonal Difference.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_27) Diagonal Difference.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_27) Diagonal Difference.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_50) Mini-Max Sum.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_50) Mini-Max Sum.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_50) Mini-Max Sum.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_50) Mini-Max Sum.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_57) Plus Minus.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_57) Plus Minus.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_57) Plus Minus.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_57) Plus Minus.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_66) Simple Array Sum.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_66) Simple Array Sum.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_66) Simple Array Sum.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_66) Simple Array Sum.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_67) Solve Me First.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_67) Solve Me First.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_67) Solve Me First.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_67) Solve Me First.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_68) Staircase.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_68) Staircase.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_68) Staircase.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_68) Staircase.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_76) Time Conversion.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_76) Time Conversion.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Algorithms/Python/Warmup/_76) Time Conversion.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Algorithms/Python/Warmup/_76) Time Conversion.py diff --git a/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/C++/Add Contents.txt b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/C++/Add Contents.txt new file mode 100644 index 000000000..e69de29bb diff --git a/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Java/Add Contents.txt b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Java/Add Contents.txt new file mode 100644 index 000000000..e69de29bb diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Arrays/_01) 2D Array - DS.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Arrays/_01) 2D Array - DS.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Arrays/_01) 2D Array - DS.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Arrays/_01) 2D Array - DS.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Arrays/_02) Arrays - DS.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Arrays/_02) Arrays - DS.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Arrays/_02) Arrays - DS.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Arrays/_02) Arrays - DS.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Arrays/_06) Dynamic Array.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Arrays/_06) Dynamic Array.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Arrays/_06) Dynamic Array.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Arrays/_06) Dynamic Array.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Arrays/_12) Left Rotation.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Arrays/_12) Left Rotation.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Arrays/_12) Left Rotation.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Arrays/_12) Left Rotation.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_03) Compare two linked lists.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_03) Compare two linked lists.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_03) Compare two linked lists.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_03) Compare two linked lists.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_04) Delete a Node.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_04) Delete a Node.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_04) Delete a Node.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_04) Delete a Node.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_05) Delete duplicate-value nodes from a sorted linked list.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_05) Delete duplicate-value nodes from a sorted linked list.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_05) Delete duplicate-value nodes from a sorted linked list.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_05) Delete duplicate-value nodes from a sorted linked list.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_07) Get Node Value.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_07) Get Node Value.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_07) Get Node Value.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_07) Get Node Value.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_08) Insert a node at a specific position in a linked list.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_08) Insert a node at a specific position in a linked list.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_08) Insert a node at a specific position in a linked list.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_08) Insert a node at a specific position in a linked list.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_09) Insert a node at the head of a linked list.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_09) Insert a node at the head of a linked list.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_09) Insert a node at the head of a linked list.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_09) Insert a node at the head of a linked list.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_10) Insert a Node at the Tail of a Linked List.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_10) Insert a Node at the Tail of a Linked List.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_10) Insert a Node at the Tail of a Linked List.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_10) Insert a Node at the Tail of a Linked List.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_11) Inserting a Node Into a Sorted Doubly Linked List.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_11) Inserting a Node Into a Sorted Doubly Linked List.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_11) Inserting a Node Into a Sorted Doubly Linked List.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_11) Inserting a Node Into a Sorted Doubly Linked List.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_13) Merge two sorted linked lists.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_13) Merge two sorted linked lists.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_13) Merge two sorted linked lists.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_13) Merge two sorted linked lists.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_14) Print in Reverse.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_14) Print in Reverse.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_14) Print in Reverse.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_14) Print in Reverse.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_15) Print the Elements of a Linked List.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_15) Print the Elements of a Linked List.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_15) Print the Elements of a Linked List.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_15) Print the Elements of a Linked List.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_16) Reverse a doubly linked list.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_16) Reverse a doubly linked list.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_16) Reverse a doubly linked list.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_16) Reverse a doubly linked list.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_17) Reverse a linked list.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_17) Reverse a linked list.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Linked List/_17) Reverse a linked list.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Linked List/_17) Reverse a linked list.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Trees/_18) Tree-Inorder Traversal.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Trees/_18) Tree-Inorder Traversal.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Trees/_18) Tree-Inorder Traversal.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Trees/_18) Tree-Inorder Traversal.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Trees/_19) Tree-Postorder Traversal.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Trees/_19) Tree-Postorder Traversal.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Trees/_19) Tree-Postorder Traversal.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Trees/_19) Tree-Postorder Traversal.py diff --git a/3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Trees/_20) Tree-Preorder Traversal.py b/3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Trees/_20) Tree-Preorder Traversal.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/Problem Solving/Data Structures/Python/Trees/_20) Tree-Preorder Traversal.py rename to 3]. Competitive Programming/HackerRank/06]. Problem Solving/Data Structures/Python/Trees/_20) Tree-Preorder Traversal.py diff --git a/3]. Competitive Programming/HackerRank/07]. Interview Preparation Kit/Add Contents.txt b/3]. Competitive Programming/HackerRank/07]. Interview Preparation Kit/Add Contents.txt new file mode 100644 index 000000000..e69de29bb diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/C++/Day_21.cpp b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/C++/Day_21.cpp similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/C++/Day_21.cpp rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/C++/Day_21.cpp diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_00.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_00.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_00.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_00.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_01.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_01.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_01.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_01.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_02.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_02.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_02.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_02.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_03.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_03.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_03.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_03.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_04.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_04.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_04.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_04.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_05.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_05.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_05.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_05.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_06.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_06.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_06.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_06.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_07.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_07.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_07.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_07.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_08.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_08.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_08.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_08.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_09.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_09.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_09.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_09.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_10.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_10.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_10.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_10.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_11.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_11.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_11.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_11.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_12.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_12.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_12.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_12.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_13.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_13.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_13.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_13.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_14.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_14.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_14.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_14.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_15.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_15.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_15.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_15.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_16.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_16.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_16.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_16.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_17.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_17.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_17.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_17.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_18.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_18.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_18.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_18.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_19.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_19.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_19.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_19.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_20.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_20.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_20.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_20.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_21.txt b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_21.txt similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_21.txt rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_21.txt diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_22.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_22.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_22.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_22.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_23.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_23.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_23.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_23.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_24.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_24.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_24.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_24.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_25.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_25.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_25.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_25.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_26.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_26.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_26.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_26.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_27.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_27.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_27.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_27.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_28.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_28.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_28.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_28.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_29.py b/3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_29.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/30 Days of Code/Python/Day_29.py rename to 3]. Competitive Programming/HackerRank/08]. 30 Days of Code/Python/Day_29.py diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/01). HackerRank [10_Days_of_JS (0)]/Data_Types.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/01). HackerRank [10_Days_of_JS (0)]/Data_Types.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/01). HackerRank [10_Days_of_JS (0)]/Data_Types.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/01). HackerRank [10_Days_of_JS (0)]/Data_Types.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/01). HackerRank [10_Days_of_JS (0)]/Hello_World.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/01). HackerRank [10_Days_of_JS (0)]/Hello_World.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/01). HackerRank [10_Days_of_JS (0)]/Hello_World.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/01). HackerRank [10_Days_of_JS (0)]/Hello_World.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Arithmetic_Operators.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Arithmetic_Operators.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Arithmetic_Operators.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Arithmetic_Operators.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Functions.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Functions.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Functions.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Functions.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Let_and_Const.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Let_and_Const.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Let_and_Const.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/02). HackerRank [10_Days_of_JS (1)]/Let_and_Const.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Conditional_Statements_IF_ELSE.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Conditional_Statements_IF_ELSE.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Conditional_Statements_IF_ELSE.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Conditional_Statements_IF_ELSE.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Conditional_Statements_SWITCH.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Conditional_Statements_SWITCH.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Conditional_Statements_SWITCH.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Conditional_Statements_SWITCH.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Loops.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Loops.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Loops.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/03). HackerRank [10_Days_of_JS (2)]/Loops.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Arrays.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Arrays.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Arrays.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Arrays.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Throw.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Throw.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Throw.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Throw.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Try_Catch.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Try_Catch.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Try_Catch.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/04). HackerRank [10_Days_of_JS (3)]/Try_Catch.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Classes.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Classes.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Classes.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Classes.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Count_Objects.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Count_Objects.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Count_Objects.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Count_Objects.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Rectangle.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Rectangle.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Rectangle.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/05). HackerRank [10_Days_of_JS (4)]/Rectangle.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Arrow_Function.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Arrow_Function.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Arrow_Function.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Arrow_Function.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Inheritance.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Inheritance.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Inheritance.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Inheritance.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Literals.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Literals.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Literals.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/06). HackerRank [10_Days_of_JS (5)]/Literals.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/07). HackerRank [10_Days_of_JS (6)]/Bitwise.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/07). HackerRank [10_Days_of_JS (6)]/Bitwise.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/07). HackerRank [10_Days_of_JS (6)]/Bitwise.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/07). HackerRank [10_Days_of_JS (6)]/Bitwise.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/07). HackerRank [10_Days_of_JS (6)]/JS_Dates.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/07). HackerRank [10_Days_of_JS (6)]/JS_Dates.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/07). HackerRank [10_Days_of_JS (6)]/JS_Dates.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/07). HackerRank [10_Days_of_JS (6)]/JS_Dates.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_I.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_I.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_I.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_I.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_II.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_II.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_II.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_II.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_III.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_III.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_III.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/08). HackerRank [10_Days_of_JS (7)]/Regular_Expression_III.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container.zip b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container.zip similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container.zip rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container.zip diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/css/buttonsGrid.css b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/css/buttonsGrid.css similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/css/buttonsGrid.css rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/css/buttonsGrid.css diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/index.html b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/index.html similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/index.html rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/index.html diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/js/buttonsGrid.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/js/buttonsGrid.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/js/buttonsGrid.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Buttons Container/js/buttonsGrid.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button.zip b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button.zip similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button.zip rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button.zip diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/css/button.css b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/css/button.css similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/css/button.css rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/css/button.css diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/index.html b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/index.html similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/index.html rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/index.html diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/js/button.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/js/button.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/js/button.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/09). HackerRank [10_Days_of_JS (8)]/Create a Button/js/button.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator.zip b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator.zip similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator.zip rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator.zip diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/css/binaryCalculator.css b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/css/binaryCalculator.css similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/css/binaryCalculator.css rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/css/binaryCalculator.css diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/index.html b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/index.html similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/index.html rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/index.html diff --git a/3]. Competitive Programming/HackerRank/10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/js/binaryCalculator.js b/3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/js/binaryCalculator.js similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/js/binaryCalculator.js rename to 3]. Competitive Programming/HackerRank/09]. 10 Days of JavaScript/10). HackerRank [10_Days_of_JS (9)]/Binary Calculator/js/binaryCalculator.js diff --git a/3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_0.py b/3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_0.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_0.py rename to 3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_0.py diff --git a/3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_1.py b/3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_1.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_1.py rename to 3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_1.py diff --git a/3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_2.md b/3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_2.md similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_2.md rename to 3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_2.md diff --git a/3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_3.md b/3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_3.md similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_3.md rename to 3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_3.md diff --git a/3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_4.py b/3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_4.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_4.py rename to 3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_4.py diff --git a/3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_5.py b/3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_5.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_5.py rename to 3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_5.py diff --git a/3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_6.py b/3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_6.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_6.py rename to 3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_6.py diff --git a/3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_7.py b/3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_7.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_7.py rename to 3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_7.py diff --git a/3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_8.py b/3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_8.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_8.py rename to 3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_8.py diff --git a/3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_9.py b/3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_9.py similarity index 100% rename from 3]. Competitive Programming/HackerRank/10 Days of Statistics/Day_9.py rename to 3]. Competitive Programming/HackerRank/10]. 10 Days of Statistics/Day_9.py diff --git a/3]. Competitive Programming/HackerRank/30 Days of Code/.DS_Store b/3]. Competitive Programming/HackerRank/30 Days of Code/.DS_Store deleted file mode 100644 index 1574955c5..000000000 Binary files a/3]. Competitive Programming/HackerRank/30 Days of Code/.DS_Store and /dev/null differ diff --git a/3]. Competitive Programming/LeetCode/1]. Problems/C++/0008)string_to_int_atoi.cpp b/3]. Competitive Programming/LeetCode/1]. Problems/C++/0008)string_to_int_atoi.cpp new file mode 100644 index 000000000..4fb07be92 --- /dev/null +++ b/3]. Competitive Programming/LeetCode/1]. Problems/C++/0008)string_to_int_atoi.cpp @@ -0,0 +1,77 @@ +#include +#include +#include +class Solution { +public: + + string trim(string s) + { + string white = " "; + int pos = 0; + while (s[pos] == ' ') + { + ++pos; + } + return s.substr(pos, s.size() - pos); + } + string trimZero(string s) + { + int pos = 0; + while (s[pos] == '0') + { + ++pos; + } + return s.substr(pos, s.size() - pos); + } + char sign = ' '; + int myAtoi(string s) { + s = trim(s); + if (s[0] == '-' or s[0] == '+') + { + sign = s[0]; + s = s.substr(1, s.size() - 1); + } + s = trimZero(s); + int i = 0; + long long num = 0; + long long prod = 1; + bool trailZero = true; + + while(isdigit(s[i])) + { + if ((prod * 10) > INT32_MAX) + { + if (sign == '-') + return INT32_MIN; + else + return INT32_MAX; + } + if (i != 0) + prod *= 10; + ++i; + } + + // cout << prod << endl; + i = 0; + while (isdigit(s[i])) + { + + num += (s[i] - '0')*prod; + prod = prod / 10; + + + ++i; + } + int x; + if (sign == '-') + { + x = INT32_MIN < -1*num? -1*num: INT32_MIN; + return x; + } + else + x = INT32_MAX < num? INT32_MAX: num; + return x; + } + + +}; \ No newline at end of file diff --git a/3]. Competitive Programming/LeetCode/1]. Problems/C++/0128) Longest_consecutive_subsequence.cpp b/3]. Competitive Programming/LeetCode/1]. Problems/C++/0128) Longest_consecutive_subsequence.cpp new file mode 100644 index 000000000..c4b4b667a --- /dev/null +++ b/3]. Competitive Programming/LeetCode/1]. Problems/C++/0128) Longest_consecutive_subsequence.cpp @@ -0,0 +1,84 @@ +#include +using namespace std; +#define rep(i,a,b) for(int i=a;ipii; +#define f first +#define s second +#define mp make_pair +typedef unsigned long long ull; +typedef long long ll; +template +class UnionFind{ +public: + unordered_map uf; + unordered_map size; + int longest = 0; + UnionFind(){} + + void insert(T a) + { + if (uf.count(a) == 0) + { + uf[a] = a; + size[a] = 1; + } + + } + T root(T i) + { + while(i != uf[i]) + { + i = uf[i]; + uf[i] = uf[uf[i]]; + } + return i; + } + + + int merge(T p, T q) + { + T a = root(p); + T b = root(q); + + + if (a == b) + return size[a]; + if (size[a] < size[b]) + { + uf[a] = b; + size[b] += size[a]; + + return size[b]; + } + else + { + uf[b] = a; + size[a] += size[b]; + + return size[a]; + } + } +}; + +class Solution { +UnionFinduf; +public: + int longestConsecutive(vector& nums) { + unordered_setseen; + if (nums.size() == 0) + return 0; + int longe = 1; + for (auto &a: nums) + { + uf.insert(a); + seen.insert(a); + if (seen.count(a-1)) + longe = max(longe, uf.merge(a, a-1)); + if(seen.count(a+1)) + longe = max(longe, uf.merge(a, a+1)); + } + return longe; + + } +}; \ No newline at end of file diff --git a/3]. Competitive Programming/LeetCode/Problems/Java/_0003)_Two_Sum.java b/3]. Competitive Programming/LeetCode/1]. Problems/Java/_0001)_Two_Sum.java similarity index 100% rename from 3]. Competitive Programming/LeetCode/Problems/Java/_0003)_Two_Sum.java rename to 3]. Competitive Programming/LeetCode/1]. Problems/Java/_0001)_Two_Sum.java diff --git a/3]. Competitive Programming/LeetCode/Problems/Java/_0001)_Add_Two_Numbers.java b/3]. Competitive Programming/LeetCode/1]. Problems/Java/_0002)_Add_Two_Numbers.java similarity index 100% rename from 3]. Competitive Programming/LeetCode/Problems/Java/_0001)_Add_Two_Numbers.java rename to 3]. Competitive Programming/LeetCode/1]. Problems/Java/_0002)_Add_Two_Numbers.java diff --git a/3]. Competitive Programming/LeetCode/Problems/Java/_0002)_Longest_Substring_Without_Repeating_Characters.java b/3]. Competitive Programming/LeetCode/1]. Problems/Java/_0003)_Longest_Substring_Without_Repeating_Characters.java similarity index 100% rename from 3]. Competitive Programming/LeetCode/Problems/Java/_0002)_Longest_Substring_Without_Repeating_Characters.java rename to 3]. Competitive Programming/LeetCode/1]. Problems/Java/_0003)_Longest_Substring_Without_Repeating_Characters.java diff --git a/3]. Competitive Programming/LeetCode/Problems/Java/_0046)_Permutations.java b/3]. Competitive Programming/LeetCode/1]. Problems/Java/_0046)_Permutations.java similarity index 100% rename from 3]. Competitive Programming/LeetCode/Problems/Java/_0046)_Permutations.java rename to 3]. Competitive Programming/LeetCode/1]. Problems/Java/_0046)_Permutations.java diff --git a/3]. Competitive Programming/LeetCode/Problems/Java/_0051)_N-Queens.java b/3]. Competitive Programming/LeetCode/1]. Problems/Java/_0051)_N-Queens.java similarity index 100% rename from 3]. Competitive Programming/LeetCode/Problems/Java/_0051)_N-Queens.java rename to 3]. Competitive Programming/LeetCode/1]. Problems/Java/_0051)_N-Queens.java diff --git a/3]. Competitive Programming/LeetCode/1]. Problems/Java/_0399)_EvaluateDivision.java b/3]. Competitive Programming/LeetCode/1]. Problems/Java/_0399)_EvaluateDivision.java new file mode 100644 index 000000000..e736880b3 --- /dev/null +++ b/3]. Competitive Programming/LeetCode/1]. Problems/Java/_0399)_EvaluateDivision.java @@ -0,0 +1,72 @@ +class Solution { + + class Edge { + String vtx; + String nbr; + double wt; + + public Edge(String vtx, String nbr, double wt) { + this.vtx = vtx; + this.nbr = nbr; + this.wt = wt; + } + } + + private Map> constructGraph(List> equations, double[] values) { + Map> graph = new HashMap<>(); + + for (int i = 0; i < equations.size(); i++) { + List equation = equations.get(i); + String u = equation.get(0); + String v = equation.get(1); + double wt = values[i]; + addEdgeToGraph(graph, u, v, wt); + addEdgeToGraph(graph, v, u, 1 / wt); + } + return graph; + } + + private void addEdgeToGraph(Map> graph, String vtx, String nbr, double wt) { + if (graph.containsKey(vtx)) + graph.get(vtx).add(new Edge(vtx, nbr, wt)); + else { + List list = new ArrayList(); + list.add(new Edge(vtx, nbr, wt)); + graph.putIfAbsent(vtx, list); + } + } + + private boolean dfs(Map> graph, String src, String destination, double weightSoFar, double[] result, int queryIndex, HashSet visited) { + if(src.equals(destination)) { + result[queryIndex] = weightSoFar; + return true; + } + visited.add(src); + + for(Edge e : graph.get(src)) { + if(visited.contains(e.nbr) == false) { + boolean pathExists = dfs(graph, e.nbr, destination, weightSoFar * e.wt, result, queryIndex, visited); + if(pathExists == true) return true; + } + } + return false; + } + + public double[] calcEquation(List> equations, double[] values, List> queries) { + Map> graph = constructGraph(equations, values); + double[] result = new double[queries.size()]; + for(int i = 0; i < queries.size(); i++) { + String u = queries.get(i).get(0); + String v = queries.get(i).get(1); + if(graph.containsKey(u) == false || graph.containsKey(v) == false) result[i] = -1.0; + else if(u.equals(v)) result[i] = 1.0; + else { + HashSet visited = new HashSet<>(); + boolean pathExists = dfs(graph, u, v, 1.0, result, i, visited); + if(!pathExists) result[i] = -1.0; + } + } + + return result; + } +} diff --git a/3]. Competitive Programming/LeetCode/Problems/Python/0001)_Two_Sum.py b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0001)_Two_Sum.py similarity index 100% rename from 3]. Competitive Programming/LeetCode/Problems/Python/0001)_Two_Sum.py rename to 3]. Competitive Programming/LeetCode/1]. Problems/Python/0001)_Two_Sum.py diff --git a/3]. Competitive Programming/LeetCode/1]. Problems/Python/0002)Add_two_numbers.py b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0002)Add_two_numbers.py new file mode 100644 index 000000000..7c64996e2 --- /dev/null +++ b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0002)Add_two_numbers.py @@ -0,0 +1,42 @@ +# Definition for singly-linked list. +# class ListNode: +# def __init__(self, val=0, next=None): +# self.val = val +# self.next = next + + +class Solution: + + def addTwoNumbers(self, l1, l2): + num1, num2 = 0,0 + prod1, prod2 = 1, 1 + while l1 != None: + num1 += prod1*l1.val + prod1 *= 10 + l1 = l1.next + while l2 != None: + num2 += prod2*l2.val + prod2 *= 10 + l2 = l2.next + result = num1+num2 + + l3 = ListNode() + head = l3 + while result != 0: + dig = result % 10 + l3.val = dig + result //= 10 + if result != 0: + l3.next = ListNode() + l3 = l3.next + + + + + + return head + + + + + diff --git a/3]. Competitive Programming/LeetCode/1]. Problems/Python/0005)Longest_palindromic_substring.py b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0005)Longest_palindromic_substring.py new file mode 100644 index 000000000..fd4b47535 --- /dev/null +++ b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0005)Longest_palindromic_substring.py @@ -0,0 +1,29 @@ +class Solution: + #S is a string + def longestPalindrome(self, s): + + long, beg = 1, 0 + n = len(s) + dp = [[None]*n for _ in range(n)] + for i in range(len(s)): + dp[i][i] = True + + for k in range(2, len(s) + 1): + for j in range(len(s) - k + 1): + + if s[j] != s[j+k-1]: + dp[j] [j+k-1] = False + else: + if k <= 2: + dp[j] [j+k-1] = True + else: + dp[j] [j+k-1] = dp[j+1] [j+k-2] + + if dp[j] [j+k-1]: + if k > long: + long = k + beg = j + + + return s[beg:beg+long] + diff --git a/3]. Competitive Programming/LeetCode/1]. Problems/Python/0009)PalindromeNumber.py b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0009)PalindromeNumber.py new file mode 100644 index 000000000..ccb93dd15 --- /dev/null +++ b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0009)PalindromeNumber.py @@ -0,0 +1,4 @@ +class Solution: + def isPalindrome(self, x): + arr = str(x) + return arr == arr[::-1] diff --git a/3]. Competitive Programming/LeetCode/1]. Problems/Python/0012)Int_to_Roman.py b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0012)Int_to_Roman.py new file mode 100644 index 000000000..a2774f872 --- /dev/null +++ b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0012)Int_to_Roman.py @@ -0,0 +1,21 @@ +class Solution: + #num is int + #return str which is the roman alternative to num + def intToRoman(self, num): + symbol = {1: 'I', 4: 'IV', 5: 'V', 9: 'IX', 10: 'X', 40: 'XL', 50: 'L', 90: 'XC', 100: 'C', 400: 'CD', 500: 'D', 900: 'CM', 1000: 'M'} + listi = list(symbol.keys()) + listi.reverse() + + string ='' + num1 = num + + for k in listi: + + tim = num//k + + string += symbol[k]*tim + + num %= k + + return string + diff --git a/3]. Competitive Programming/LeetCode/1]. Problems/Python/0013)Roman_to_int.py b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0013)Roman_to_int.py new file mode 100644 index 000000000..c804a5ece --- /dev/null +++ b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0013)Roman_to_int.py @@ -0,0 +1,32 @@ +class Solution: + #s is a str which represents roman number + #returns int which is alternative to roman number + def romanToInt(self, s): + d = { + "M": 1000, + "CM": 900, + "D": 500, + "CD": 400, + "C": 100, + "XC": 90, + "L": 50, + "XL": 40, + "X": 10, + "IX": 9, + "V": 5, + "IV": 4, + "I": 1, + } + size = len(s) + num = 0 + i = 0 + while i < size: + x = s[i:min(size, i+2)] + if x in d: + num += d[x] + i+=1 + else: + num += d[s[i]] + i+=1 + return num + diff --git a/3]. Competitive Programming/LeetCode/1]. Problems/Python/0014)Longest_common_prefix.py b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0014)Longest_common_prefix.py new file mode 100644 index 000000000..cdc8c71fe --- /dev/null +++ b/3]. Competitive Programming/LeetCode/1]. Problems/Python/0014)Longest_common_prefix.py @@ -0,0 +1,29 @@ +class Solution: + #strs is a list of strings + #mid is the endpos of substring to be checked + #returns True if strs[0: mid] is a common prefix, false otherwise + def commonPre(self, strs, mid): + comp = strs[0][:mid] + for i in range(1, len(strs)): + if comp != strs[i] [:mid]: + return False + return True + + #strs is a list of str + #returns str which is the largest common prefix + def longestCommonPrefix(self, strs): + minLen = 1000000 + #looking for minLen from all strings in the list as the common prefix can be at max the full length as the shortest string + for a in strs: + minLen = min(minLen, len(a)) + lo, hi = 1, minLen + + #using binary search to find the common prefix + while lo <= hi: + mid = (lo + hi) //2 + if self.commonPre(strs, mid): + lo = mid+1 + else: + hi = mid-1 + + return strs[0] [: (lo+hi)//2] diff --git a/3]. Competitive Programming/LeetCode/2]. Contests/1]. Weekly Contests/Add Contents.txt b/3]. Competitive Programming/LeetCode/2]. Contests/1]. Weekly Contests/Add Contents.txt new file mode 100644 index 000000000..e69de29bb diff --git a/3]. Competitive Programming/LeetCode/2]. Contests/2]. Biweekly Contests/Add Contents.txt b/3]. Competitive Programming/LeetCode/2]. Contests/2]. Biweekly Contests/Add Contents.txt new file mode 100644 index 000000000..e69de29bb diff --git a/6]. Important Books/Important_Books_Link.md b/6]. Important Books and Resources/Important_Books_Link.md similarity index 55% rename from 6]. Important Books/Important_Books_Link.md rename to 6]. Important Books and Resources/Important_Books_Link.md index 37f9df585..24c9bfe40 100644 --- a/6]. Important Books/Important_Books_Link.md +++ b/6]. Important Books and Resources/Important_Books_Link.md @@ -9,15 +9,26 @@ | | ├── Python | | ├── Java | | └── ... -| ├── Data Structures +| | +| ├── Data Structures +| | ├── Data Structures and Algorithms by Narasimha Karumanchi +| | ├── Data Structures and Algorithms in Python by Michael T. Goodrich +| | └── ... +| | | ├── Algorithms +| | ├── Introduction to Algorithms by Thomas H. Cormen +| | ├── Algorithms by Robert Sedgewick and Kevin Wayne +| | └── ... +| | | ├── Competitive Programming | | ├── Guide to Competitive Programming By Antti Laaksonen | | ├── Competitive Programmer’s Handbook By Antti Laaksonen | | └── ... +| | | ├── Coding Interviews | | ├── Cracking the Coding Interview by GAYLE LAAKMANN McDowELL | | └── ... +| | | ├── Technical Subjects | | ├── OOP | | ├── OS @@ -25,7 +36,12 @@ | | ├── SQL | | ├── CN | | └── ... +| | | ├── Aptitude & Reasoning +| | +| ├── Low Level Design +| | ├── Object Oriented Design +| | └── ... | └── ... └── ... ``` @@ -37,22 +53,27 @@ 5. [`Coding Interviews`](#coding-interviews) 6. `Technical Subjects` 7. `Aptitude & Reasoning` +8. [`Low Level Design`](#low-level-design) --- ## `Data Structures` -- [Data Structures and Algorithms by `Narasimha Karumanchi`](https://www.docdroid.net/ZPfHmS5/data-structures-and-algorithms-narasimha-karumanchi-pdf) +- [Data Structures and Algorithms by `Narasimha Karumanchi`]() +- [Data Structures and Algorithms in Python by `Michael T. Goodrich`]() ## `Algorithms` -- [Introduction to Algorithms by `Thomas H. Cormen`](https://edutechlearners.com/download/Introduction_to_algorithms-3rd%20Edition.pdf) -- [Algorithms by `Robert Sedgewick` and `Kevin Wayne`](http://index-of.es/Varios-2/Algorithms%204th%20Edition.pdf) +- [Introduction to Algorithms by `Thomas H. Cormen`]() +- [Algorithms by `Robert Sedgewick` and `Kevin Wayne`]() ## `Competitive Programming` -- [Guide to Competitive Programming by `Antti Laaksonen`](https://drive.google.com/file/d/1-_qgdODciPQgzi8NciMtjYj01Dydq385/view) -- [Competitive Programmer’s Handbook by `Antti Laaksonen`](https://drive.google.com/file/d/13ceEppbAS1oEe4QRmtCuhF4LlpFxmEHL/view?usp=sharing) +- [Guide to Competitive Programming by `Antti Laaksonen`]() +- [Competitive Programmer’s Handbook by `Antti Laaksonen`]() ## `Coding Interviews` -- [Cracking the Coding Interview by `GAYLE LAAKMANN MCDOWELL `](https://cin.ufpe.br/~fbma/Crack/Cracking%20the%20Coding%20Interview%20189%20Programming%20Questions%20and%20Solutions.pdf) +- [Cracking the Coding Interview by `GAYLE LAAKMANN MCDOWELL `]() +## `Low Level Design` +- [Object Oriented Design](https://www.oodesign.com/) +- --- diff --git a/README.md b/README.md index eb7efb73c..be38630c0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@


+

+ +

+

Iamtripathisatyam

@@ -10,6 +14,11 @@

+## `Usage` + +![Typing SVG](https://readme-typing-svg.herokuapp.com/?font=Bold&color=00ff00&vCenter=true&lines=The+Complete+FAANG+Preparation+pot%3F) + + ## [`Welcome to The-Complete-FAANG-Preparation Discussions!`](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/discussions) [![Discussion Tab](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/images/Discussion%20Tab.PNG)](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/discussions) @@ -29,6 +38,8 @@ ![Issues Close](https://img.shields.io/github/issues-closed/AkashSingh3031/The-Complete-FAANG-Preparation?style=flat&logo=github) ![Open PRs](https://img.shields.io/github/issues-pr/AkashSingh3031/The-Complete-FAANG-Preparation?style=flat&logo=github) ![Close PRs](https://img.shields.io/github/issues-pr-closed/AkashSingh3031/The-Complete-FAANG-Preparation?style=flat&color=critical&logo=github) +![Awesome Contributors](https://img.shields.io/github/contributors/AkashSingh3031/The-Complete-FAANG-Preparation?label=Awesome%20Contributors&style=for-the-badge&logo=github) +![Last Commit](https://img.shields.io/github/last-commit/AkashSingh3031/The-Complete-FAANG-Preparation?style=for-the-badge&logo=github)
@@ -36,9 +47,10 @@ + --- -# `The Complete FAANG Preparation` +# 🏆 `The Complete FAANG Preparation` 🏆 This repository contains all the DSA (Data-Structures, Algorithms, 450 DSA by Love Babbar Bhaiya, FAANG Questions), Technical Subjects (OS + DBMS + SQL + CN + OOPs) Theory+Questions,FAANG Interview questions and Miscellaneous Stuff (Programming MCQs, Puzzles, Aptitude, Reasoning). The Programming languages used for demonstration are the C++, Python, and Java. @@ -47,18 +59,29 @@ This repository contains all the DSA (Data-Structures, Algorithms, 450 DSA by Lo ### `Table of Contents` | SNo. | **Contents** | | --- | --------- | +| 0. | [ASK Your Doubts](#0-ask-your-doubts) | | 1. | [Miscellaneous Stuff](#1-miscellaneous-stuff) | | 2. | [DSA](#2-dsa) | | 3. | [Competitive Programming](#3-competitive-programming) | | 4. | [Technical Subject](#4-technical-subject) | | 5. | [Low Level Design](#5-low-level-design) | | 6. | [Projects](#6-projects) | -| 7. | [Impotant Books](#7-important-books) | +| 7. | [Impotant Books and Resources](#7-important-books-and-resources) | ## `Tree of Index` ```js . ├── ... +├── 𝑨𝑺𝑲 𝒀𝒐𝒖𝒓 𝑫𝒐𝒖𝒃𝒕𝒔 +| ├── Data Structure & Algorithms +| | └── ... +| | +| ├── Technical Subjects +| | └── ... +| | +| └── ... +| +| ├── 𝑴𝒊𝒔𝒄𝒆𝒍𝒍𝒂𝒏𝒆𝒐𝒖𝒔 𝑺𝒕𝒖𝒇𝒇 | ├── Aptitude & Reasoning | | └── ... @@ -82,6 +105,10 @@ This repository contains all the DSA (Data-Structures, Algorithms, 450 DSA by Lo | ├── 450 DSA by @Love Babbar | | └── ... | | +| ├── Striver Series +| | ├── 30 Days of SDE Sheet +| | └── ... +| | | ├── FAANG Interview Questions | | ├── Facebook | | ├── Amazon @@ -169,17 +196,47 @@ This repository contains all the DSA (Data-Structures, Algorithms, 450 DSA by Lo | | └── ... | | | ├── CodeChef -| | ├── Long Challenge +| | ├── Long Challeng +| | | ├── Div-1 +| | | ├── Div-2 +| | | ├── Div-3 +| | | └── ... | | ├── Cook-off +| | | ├── Div-1 +| | | ├── Div-2 +| | | ├── Div-3 +| | | └── ... | | ├── Lunch Time +| | | ├── Div-1 +| | | ├── Div-2 +| | | ├── Div-3 +| | | └── ... | | └── ... | | | ├── CodeForces | | ├── Problem_Set +| | | ├── Levels +| | | | ├── A +| | | | ├── B +| | | | ├── C +| | | | ├── D +| | | | └── ... +| | | └── ... +| | ├── Contests +| | | ├── Rounds +| | | | ├── Div-1 +| | | | ├── Div-2 +| | | | ├── Div-3 +| | | | └── ... +| | | └── ... | | └── ... | | | ├── LeetCode | | ├── Problems +| | ├── Contests +| | | ├── Weekly Contests +| | | ├── Biweekly Contests +| | | └── ... | | └── ... | | | ├── InterviewBit @@ -277,10 +334,26 @@ This repository contains all the DSA (Data-Structures, Algorithms, 450 DSA by Lo | | ├── Python | | ├── Java | | └── ... -| ├── Data Structures +| | +| ├── Data Structures +| | ├── Data Structures and Algorithms By Narasimha Karumanchi +| | ├── Data Structures and Algorithms in Python By Michael T. Goodrich +| | └── ... +| | | ├── Algorithms +| | ├── Introduction to Algorithms By Thomas H. Cormen +| | ├── Algorithms By Robert Sedgewick and Kevin Wayne +| | └── ... +| | | ├── Competitive Programming +| | ├── Guide to Competitive Programming By Antti Laaksonen +| | ├── Competitive Programmer’s Handbook By Antti Laaksonen +| | └── ... +| | | ├── Coding Interviews +| | ├── Cracking the Coding Interview By GAYLE LAAKMANN MCDOWELL +| | └── ... +| | | ├── Technical Subjects | | ├── OOP | | ├── OS @@ -288,13 +361,22 @@ This repository contains all the DSA (Data-Structures, Algorithms, 450 DSA by Lo | | ├── SQL | | ├── CN | | └── ... +| | | ├── Aptitude & Reasoning +| | +| ├── Low Level Design +| | ├── Object Oriented Design +| | └── ... | └── ... └── ... ``` ## `Domain` +### 0. [ASK Your Doubts](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/%60%60ASK%20Your%20Doubts%60%60) + - [Data Structure & Algorithms](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/%60%60ASK%20Your%20Doubts%60%60/DSA%20Questions) + - [Technical Subjects](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/%60%60ASK%20Your%20Doubts%60%60/Technical%20Questions) + ### 1. [Miscellaneous Stuff](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/0%5D.%20Miscellaneous%20Stuff) - [Aptitude & Reasoning](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/0%5D.%20Miscellaneous%20Stuff/Aptitude%20%26%20Reasoning) - [Basic Programming MCQs](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/0%5D.%20Miscellaneous%20Stuff/Basic%20Programming%20MCQs) @@ -304,6 +386,8 @@ This repository contains all the DSA (Data-Structures, Algorithms, 450 DSA by Lo - [Data Structures](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/1%5D.%20DSA/1%5D.%20Data%20Structures) - [Algorithms](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/1%5D.%20DSA/2%5D.%20Algorithms) - [450 DSA by @Love Babbar](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/1%5D.%20DSA/450%20DSA%20by%20(%20Love%20Babbar%20Bhaiya%20)) + - [Striver Series](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/1%5D.%20DSA/Striver%20Series) + - [30 Days of SDE Sheet](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/1%5D.%20DSA/Striver%20Series/30%20Days%20of%20SDE%20Sheet) - [FAANG Interview Questions](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/1%5D.%20DSA/FAANG%20Interview%20DSA%20Questions) - [Facebook](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/1%5D.%20DSA/FAANG%20Interview%20DSA%20Questions/Facebook) - [Amazon](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/1%5D.%20DSA/FAANG%20Interview%20DSA%20Questions/Amazon) @@ -317,7 +401,7 @@ This repository contains all the DSA (Data-Structures, Algorithms, 450 DSA by Lo - [GeeksforGeeks](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/3%5D.%20Competitive%20Programming/GeeksforGeeks) - [HackerEarth](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/3%5D.%20Competitive%20Programming/HackerEarth) - [CodeChef](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/3%5D.%20Competitive%20Programming/CodeChef) - - [CodeForce](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/3%5D.%20Competitive%20Programming/CodeForce) + - [CodeForces](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/3%5D.%20Competitive%20Programming/CodeForces) - [LeetCode](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/3%5D.%20Competitive%20Programming/LeetCode) - [InterviewBit](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/3%5D.%20Competitive%20Programming/InterviewBit) @@ -338,23 +422,25 @@ This repository contains all the DSA (Data-Structures, Algorithms, 450 DSA by Lo - [Internet of Things (IOT)](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/5%5D.%20Projects/Internet%20of%20Things%20(IOT)) - [Web Development](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/5%5D.%20Projects/Web%20Development) - [Mobile Development](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/5%5D.%20Projects/Mobile%20Development) + - [GUI Projects](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/tree/master/5%5D.%20Projects/GUI%20Projects) -### 7. [Important Books](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books/Important_Books_Link.md) - - [Programming Language](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books/Important_Books_Link.md#tree-of-index) - - [Data Structures](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books/Important_Books_Link.md#data-structures) - - [Algorithms](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books/Important_Books_Link.md#algorithms) - - [Competitive Programming](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books/Important_Books_Link.md#competitive-programming) - - [Coding Interviews](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books/Important_Books_Link.md#coding-interviews) - - [Technical Subjects](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books/Important_Books_Link.md#tree-of-index) - - [Aptitude & Reasoning](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books/Important_Books_Link.md#tree-of-index) +### 7. [Important Books and Resources](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books%20and%20Resources/Important_Books_Link.md) + - [Programming Language](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books%20and%20Resources/Important_Books_Link.md#tree-of-index) + - [Data Structures](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books%20and%20Resources/Important_Books_Link.md#data-structures) + - [Algorithms](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books%20and%20Resources/Important_Books_Link.md#algorithms) + - [Competitive Programming](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books%20and%20Resources/Important_Books_Link.md#competitive-programming) + - [Coding Interviews](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books%20and%20Resources/Important_Books_Link.md#coding-interviews) + - [Technical Subjects](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books%20and%20Resources/Important_Books_Link.md#tree-of-index) + - [Aptitude & Reasoning](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books%20and%20Resources/Important_Books_Link.md#tree-of-index) + - [Low Level Design](https://github.com/AkashSingh3031/The-Complete-FAANG-Preparation/blob/master/6%5D.%20Important%20Books%20and%20Resources/Important_Books_Link.md#low-level-design) -## `Project Admin` +## 🏆 `Project Admin` | | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | **[Akash Singh](https://www.linkedin.com/in/akash-singh3031/)** | -## `Awesome Contributors ✨🎉` +## `Awesome Contributors ✨🎉` `32` Thanks goes to these **Wonderful People** 👨🏻‍💻: @@ -410,6 +496,28 @@ Thanks goes to these **Wonderful People** 👨🏻‍💻:
devraj4522

💻 ✍️ +
RounakNeogy

💻 ✍️ + +
ashwin3082002

💻 ✍️ + +
VishnuSastryHK

💻 ✍️ + +
muhiqsimui

💻 ✍️ + +
adityagi02

💻 ✍️ + +
Satyamchaubey07

💻 ✍️ + +
vedudx

💻 ✍️ + + +
sheetalneeraj

💻 ✍️ + +
amandewatnitrr

💻 ✍️ + +
samnoon1971

💻 ✍️ + +
draciel58

💻 ✍️ diff --git a/``ASK Your Doubts``/DSA Questions/Add Contents.txt b/``ASK Your Doubts``/DSA Questions/Add Contents.txt new file mode 100644 index 000000000..e69de29bb diff --git a/``ASK Your Doubts``/Readme.md b/``ASK Your Doubts``/Readme.md new file mode 100644 index 000000000..e69de29bb diff --git a/``ASK Your Doubts``/Technical Questions/Add Contents.txt b/``ASK Your Doubts``/Technical Questions/Add Contents.txt new file mode 100644 index 000000000..e69de29bb