forked from Hithomelabs/DSA_sheets
Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
a2575a38c6 | |||
674a566a1e | |||
8c753f8eb1 | |||
ff2c7c095e | |||
1cdece1ba9 | |||
50c363b533 | |||
cebde22d3b | |||
1dc0efd006 | |||
3aa234bcea | |||
eadef049e4 | |||
29ff76ebe1 | |||
4a1c235c5c | |||
7bb4ac68c6 | |||
35167a6736 | |||
075c139a45 | |||
459c45854b | |||
5126d6ea41 | |||
553424d3c7 | |||
8defdb6343 | |||
38b40b45dc | |||
5b9343714a | |||
d306db54d2 | |||
a8cf5912a8 | |||
1d40588873 | |||
6e1ce7a48e | |||
48dff4a8df | |||
32ccf9dd12 | |||
fabcf449e3 | |||
b57b6f14eb | |||
dd218447e3 | |||
d6809be87a |
9
.gitattributes
vendored
Normal file
9
.gitattributes
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# Linux start script should use lf
|
||||
/gradlew text eol=lf
|
||||
|
||||
# These are Windows script files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
# Ignore Gradle project-specific cache directory
|
||||
.gradle
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
61
Questions.md
Normal file
61
Questions.md
Normal file
@ -0,0 +1,61 @@
|
||||
### List of curated Questions:
|
||||
|
||||
### Topic: Arrays, Binary Search, Two-pointers
|
||||
|
||||
1. [Two sum](https://leetcode.com/problems/two-sum/description/) `Leetcode 150` `Blind 75` `Striver`
|
||||
2. [Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/) `Leetcode 150` `Blind 75` `Striver`
|
||||
3. [Contains Duplicate](https://leetcode.com/problems/contains-duplicate/description/) `Blind 75`
|
||||
4. [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/description/?envType=study-plan-v2&envId=top-interview-150) `Leetcode 150` `Blind 75`
|
||||
5. [Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/description/) `Blind 75`
|
||||
6. [Find Minimum in Rotated Sorted Array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/) `Blind 75` `Leetcode 150`
|
||||
7. [Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/description/) `Blind 75` `Leetcode 150` `Striver`
|
||||
8. [3sum](https://leetcode.com/problems/3sum/description/) `Blind 75` `Leetcode 150` `Striver`
|
||||
9. [Container With Most Water](https://leetcode.com/problems/container-with-most-water/description/) `Blind 75` `Leetcode 150`
|
||||
10. [Set Matrix Zeroes](https://leetcode.com/problems/set-matrix-zeroes/description/) `Blind 75` `Leetcode 150` `Striver`
|
||||
11. [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/description/) `Leetcode 150` `Striver`
|
||||
12. [Rotate Image](https://leetcode.com/problems/rotate-image/description/) `Blind 75` `Leetcode 150` `Striver`
|
||||
13. [Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/description/) `Leetcode 150` `Striver`
|
||||
14. [Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/description/) `Striver`
|
||||
15. [Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/description/) `Leetcode 150` `Striver`
|
||||
16. [Pow(x, n)](https://leetcode.com/problems/powx-n/description/) `Leetcode 150` `Striver`
|
||||
17. [Majority Element](https://leetcode.com/problems/majority-element/description/) `Leetcode 150` `Striver`
|
||||
18. [Longest Consecutive Sequence](https://leetcode.com/problems/longest-consecutive-sequence/description/) `Leetcode 150` `Striver`
|
||||
19. [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/description/) `Leetcode 150` `Striver`
|
||||
20. [Spiral Matrix](https://leetcode.com/problems/spiral-matrix/description/) `Blind 75` `Leetcode 150`
|
||||
21. [Word Search](https://leetcode.com/problems/word-search/description/) `Blind 75` `Leetcode 150`
|
||||
|
||||
### Topic: Linked Lists
|
||||
1. [Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/description/) `Blind 75` `Striver`
|
||||
2. [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/description/) `Blind 75` `Leetcode 150` `Striver`
|
||||
3. [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/description/) `Blind 75` `Leetcode 150` `Striver`
|
||||
4. [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/description/) `Blind 75` `Leetcode 150` `Striver`
|
||||
5. [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/description/) `Blind 75` `Leetcode 150` `Striver`
|
||||
6. [Reorder List](https://leetcode.com/problems/reorder-list/description/) `Blind 75`
|
||||
7. [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/description/) `Leetcode 150` `Striver`
|
||||
8. [Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list/description/) `Leetcode 150` `Striver`
|
||||
9. [Reverse a LinkedList in groups of size k.](https://leetcode.com/problems/reverse-nodes-in-k-group/description/) `Leetcode 150` `Striver`
|
||||
10. [Rotate List](https://leetcode.com/problems/rotate-list/description/) `Leetcode 150` `Striver`
|
||||
11. [Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/description/) `Leetcode 150` `Striver`
|
||||
12. [Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/description/) `Leetcode 150` `Striver`
|
||||
|
||||
### Topic: Intervals
|
||||
1. [Merge Intervals](https://leetcode.com/problems/merge-intervals/description/) `Blind 75` `Leetcode 150` `Striver`
|
||||
2. [Insert Interval](https://leetcode.com/problems/insert-interval/description/) `Blind 75` `Leetcode 150`
|
||||
3. [Non-overlapping Intervals](https://leetcode.com/problems/non-overlapping-intervals/description/) `Blind 75`
|
||||
4. [Summary Ranges](https://leetcode.com/problems/summary-ranges/description/) `Leetcode 150`
|
||||
5. [Minimum Number of Arrows to Burst Balloons](https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/description/) `Leetcode 150`
|
||||
6. [Meeting rooms II](https://www.interviewbit.com/problems/meeting-rooms/) `Blind 75`
|
||||
|
||||
### Topic: Stack and Queue
|
||||
1. [Implement Stack using Queues](https://leetcode.com/problems/implement-stack-using-queues/description/) `Striver`
|
||||
2. [Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/description/) `Striver`
|
||||
3. [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/description/) `Leetcode 150` `Striver`
|
||||
4. [Min Stack](https://leetcode.com/problems/min-stack/description/) `Leetcode 150` `Striver`
|
||||
5. [LRU Cache](https://leetcode.com/problems/lru-cache/description/) `Leetcodze 150` `Striver`
|
||||
6. [Nearest Smaller Element](https://www.interviewbit.com/problems/nearest-smaller-element/) `Striver`
|
||||
7. [Next Greater Element I](https://leetcode.com/problems/next-greater-element-i/description/) `Striver`
|
||||
8. [LFU Cache](https://leetcode.com/problems/lfu-cache/description/) `Striver`
|
||||
9. [Largest Rectangle in Histogram](https://leetcode.com/problems/largest-rectangle-in-histogram/description/) `Striver`
|
||||
10. [Sliding Window Maximun](https://leetcode.com/problems/sliding-window-maximum/description/) `Striver`
|
||||
11. [Online Stock Span](https://leetcode.com/problems/online-stock-span/description/) `Striver`
|
||||
12. [The Celebrity Problem](https://www.geeksforgeeks.org/problems/the-celebrity-problem/1) `Striver`
|
@ -0,0 +1,7 @@
|
||||
### The aim of this repository is to curate DSA sheets, find concepts, patterns and questions that repeat in most sheets and write good quality, optimal, JAVA code for the problems.
|
||||
|
||||
#### Sheets considered currently are based on community cult status, popularity and the ones that cover most problem solving patterns.
|
||||
|
||||
1. [Leetcode Top 150](https://leetcode.com/studyplan/top-interview-150/)
|
||||
2. [Striver's SDE sheet](https://takeuforward.org/interviews/strivers-sde-sheet-top-coding-interview-problems)
|
||||
3. [Team Blind Top 75](https://www.teamblind.com/post/new-year-gift---curated-list-of-top-75-leetcode-questions-to-save-your-time-oam1oreu)
|
Binary file not shown.
Before Width: | Height: | Size: 8.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
Before Width: | Height: | Size: 31 KiB |
Binary file not shown.
Before Width: | Height: | Size: 16 KiB |
@ -1,458 +0,0 @@
|
||||
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/25.0.1 Chrome/128.0.6613.186 Electron/32.2.6 Safari/537.36" version="25.0.1">
|
||||
<diagram name="Page-1" id="3Nv9w00sIQpEx1Wkzt6H">
|
||||
<mxGraphModel dx="1434" dy="870" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="4gG0cXiCENDh7luhxtHf-7" target="4gG0cXiCENDh7luhxtHf-8">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-11" value="clones" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-9">
|
||||
<mxGeometry x="-0.0167" y="-3" relative="1" as="geometry">
|
||||
<mxPoint y="-3" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-7" value="fallenbagel/Jellyseer" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="309.97" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="4gG0cXiCENDh7luhxtHf-8" target="4gG0cXiCENDh7luhxtHf-14">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-16" value="push" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-15">
|
||||
<mxGeometry x="-0.1262" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-8" value="kruti/jellyseer" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="620" y="309.97" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="4gG0cXiCENDh7luhxtHf-8" target="4gG0cXiCENDh7luhxtHf-8">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-13" value="added new feature branch" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-12">
|
||||
<mxGeometry x="-0.1385" relative="1" as="geometry">
|
||||
<mxPoint y="-10" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="4gG0cXiCENDh7luhxtHf-14" target="4gG0cXiCENDh7luhxtHf-17">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-19" value="forks" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-18">
|
||||
<mxGeometry x="0.01" y="-2" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-14" value="HitHomeLabs/Jellyseer" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="605" y="489.97" width="150" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-17" value="hitanshu/jellyseer" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="489.97" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-40" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4gG0cXiCENDh7luhxtHf-20">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="900" y="970" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="360" y="1020" />
|
||||
<mxPoint x="900" y="1020" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-42" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4gG0cXiCENDh7luhxtHf-20" target="4gG0cXiCENDh7luhxtHf-32">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-43" value="push" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-42">
|
||||
<mxGeometry x="-0.0639" y="-2" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-20" value="Hithomelabs/jellyseer_mirror" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="270" y="900" width="180" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-28" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="4gG0cXiCENDh7luhxtHf-22" target="4gG0cXiCENDh7luhxtHf-27">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-30" value="forks" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-28">
|
||||
<mxGeometry x="-0.2794" y="-2" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-22" value="fallenbagel/Jellyseer" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="600" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="4gG0cXiCENDh7luhxtHf-25" target="4gG0cXiCENDh7luhxtHf-32">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="890" y="830" />
|
||||
<mxPoint x="680" y="830" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-25" value="kruti/jellyseer" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="830" y="900" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="4gG0cXiCENDh7luhxtHf-27" target="4gG0cXiCENDh7luhxtHf-20">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-31" value="mirrors" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-29">
|
||||
<mxGeometry x="-0.1841" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-27" value="HithomeLabs/jellyseer" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="295" y="750" width="130" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-35" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4gG0cXiCENDh7luhxtHf-32" target="4gG0cXiCENDh7luhxtHf-25">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-38" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=0;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="4gG0cXiCENDh7luhxtHf-32" target="4gG0cXiCENDh7luhxtHf-27">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-39" value="push" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-38">
|
||||
<mxGeometry x="0.1785" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-32" value="Hithomelabs/jellyseer" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="620" y="900" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-89" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
|
||||
<mxGeometry x="1160" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-90" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
|
||||
<mxGeometry x="1201" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-91" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1241" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-92" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1281" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-93" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1321" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-94" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" vertex="1" parent="1">
|
||||
<mxGeometry x="1361" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-95" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" vertex="1" parent="1">
|
||||
<mxGeometry x="1401" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-96" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="1">
|
||||
<mxGeometry x="1441" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-97" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="1">
|
||||
<mxGeometry x="1481" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-98" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" vertex="1" parent="1">
|
||||
<mxGeometry x="1521" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-99" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
|
||||
<mxGeometry x="1160" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-100" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffcc99;strokeColor=#36393d;" vertex="1" parent="1">
|
||||
<mxGeometry x="1361" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-101" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1201" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-102" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffcc99;strokeColor=#36393d;" vertex="1" parent="1">
|
||||
<mxGeometry x="1441" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-103" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffcc99;strokeColor=#36393d;" vertex="1" parent="1">
|
||||
<mxGeometry x="1521" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-104" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" vertex="1" parent="1">
|
||||
<mxGeometry x="1241" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-105" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffcc99;strokeColor=#36393d;" vertex="1" parent="1">
|
||||
<mxGeometry x="1401" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-106" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="1">
|
||||
<mxGeometry x="1281" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-107" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffcc99;strokeColor=#36393d;" vertex="1" parent="1">
|
||||
<mxGeometry x="1481" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-108" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" vertex="1" parent="1">
|
||||
<mxGeometry x="1321" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-109" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
|
||||
<mxGeometry x="1160" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-110" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
|
||||
<mxGeometry x="1201" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-111" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1241" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-112" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1281" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-113" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1321" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-114" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" vertex="1" parent="1">
|
||||
<mxGeometry x="1361" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-115" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" vertex="1" parent="1">
|
||||
<mxGeometry x="1401" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-116" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="1">
|
||||
<mxGeometry x="1441" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-117" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="1">
|
||||
<mxGeometry x="1481" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-118" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" vertex="1" parent="1">
|
||||
<mxGeometry x="1521" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-119" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1100" y="439.71" as="sourcePoint" />
|
||||
<mxPoint x="1160" y="439.71" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-121" value="unique" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-119">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint x="13" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-122" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1179.71" y="380" as="sourcePoint" />
|
||||
<mxPoint x="1179.71" y="420" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-123" value="seek" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-122">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-124" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1381" y="659.97" as="sourcePoint" />
|
||||
<mxPoint x="1380.71" y="619.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-125" value="seek" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-124">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint y="-9" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-127" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
|
||||
<mxGeometry x="1160" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-128" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
|
||||
<mxGeometry x="1240.5" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-129" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1201" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-130" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1281" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-131" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1321" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-132" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" vertex="1" parent="1">
|
||||
<mxGeometry x="1361" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-133" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" vertex="1" parent="1">
|
||||
<mxGeometry x="1401" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-134" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="1">
|
||||
<mxGeometry x="1441" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-135" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="1">
|
||||
<mxGeometry x="1481" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-136" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" vertex="1" parent="1">
|
||||
<mxGeometry x="1521" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-141" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1160" y="310" as="sourcePoint" />
|
||||
<mxPoint x="1240" y="310" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-152" value="unique" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-141">
|
||||
<mxGeometry x="-0.1179" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-143" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1241" y="309.97" as="sourcePoint" />
|
||||
<mxPoint x="1360" y="310" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-144" value="re" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-143">
|
||||
<mxGeometry x="0.2536" y="-1" relative="1" as="geometry">
|
||||
<mxPoint x="-10" y="-1" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-146" value="repeated" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-143">
|
||||
<mxGeometry x="0.0852" y="-1" relative="1" as="geometry">
|
||||
<mxPoint x="-6" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-147" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1360" y="310" as="sourcePoint" />
|
||||
<mxPoint x="1560" y="310" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-148" value="re" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-147">
|
||||
<mxGeometry x="0.2536" y="-1" relative="1" as="geometry">
|
||||
<mxPoint x="-10" y="-1" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-149" value="un-processed" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-147">
|
||||
<mxGeometry x="0.0852" y="-1" relative="1" as="geometry">
|
||||
<mxPoint x="-6" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-153" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1221" y="490" as="sourcePoint" />
|
||||
<mxPoint x="1220.71" y="460" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-156" value="limit" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-153">
|
||||
<mxGeometry x="0.1651" y="2" relative="1" as="geometry">
|
||||
<mxPoint x="2" y="3" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-157" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
|
||||
<mxGeometry x="1160" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-158" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
|
||||
<mxGeometry x="1321" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-159" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1201" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-160" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1241" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-161" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1281" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-162" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" vertex="1" parent="1">
|
||||
<mxGeometry x="1361" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-163" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" vertex="1" parent="1">
|
||||
<mxGeometry x="1401" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-164" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="1">
|
||||
<mxGeometry x="1441" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-165" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="1">
|
||||
<mxGeometry x="1481" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-166" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" vertex="1" parent="1">
|
||||
<mxGeometry x="1521" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-167" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1260.71" y="660" as="sourcePoint" />
|
||||
<mxPoint x="1260.21" y="619.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-168" value="unique" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-167">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint y="-9" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-172" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1421" y="659.97" as="sourcePoint" />
|
||||
<mxPoint x="1420.71" y="619.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-173" value="limit" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-172">
|
||||
<mxGeometry x="0.1651" y="2" relative="1" as="geometry">
|
||||
<mxPoint x="2" y="3" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-179" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1461" y="829.97" as="sourcePoint" />
|
||||
<mxPoint x="1460.71" y="789.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-180" value="seek" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-179">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint y="-9" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-181" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
|
||||
<mxGeometry x="1160" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-182" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
|
||||
<mxGeometry x="1321" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-183" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1201" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-184" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1361" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-185" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="1">
|
||||
<mxGeometry x="1281" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-186" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" vertex="1" parent="1">
|
||||
<mxGeometry x="1401" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-187" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" vertex="1" parent="1">
|
||||
<mxGeometry x="1241" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-188" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="1">
|
||||
<mxGeometry x="1441" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-189" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="1">
|
||||
<mxGeometry x="1481" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-190" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" vertex="1" parent="1">
|
||||
<mxGeometry x="1521" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-191" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1301.21" y="830" as="sourcePoint" />
|
||||
<mxPoint x="1300.71" y="789.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-192" value="unique" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-191">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint y="-9" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-193" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1421" y="829.97" as="sourcePoint" />
|
||||
<mxPoint x="1420.71" y="789.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-194" value="limit" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-193">
|
||||
<mxGeometry x="0.1651" y="2" relative="1" as="geometry">
|
||||
<mxPoint x="2" y="3" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-195" value="" style="curved=1;endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;endFill=1;strokeColor=default;startArrow=classic;startFill=1;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1381" y="749.97" as="sourcePoint" />
|
||||
<mxPoint x="1250.5" y="749.97" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="1350" y="710" />
|
||||
<mxPoint x="1300" y="710" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-196" value="swap" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="4gG0cXiCENDh7luhxtHf-195">
|
||||
<mxGeometry x="0.1181" y="4" relative="1" as="geometry">
|
||||
<mxPoint x="12" y="-4" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
@ -1,347 +0,0 @@
|
||||
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/25.0.1 Chrome/128.0.6613.186 Electron/32.2.6 Safari/537.36" version="25.0.1">
|
||||
<diagram name="Page-1" id="3Nv9w00sIQpEx1Wkzt6H">
|
||||
<mxGraphModel dx="565" dy="838" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-89" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" parent="1" vertex="1">
|
||||
<mxGeometry x="1160" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-90" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" parent="1" vertex="1">
|
||||
<mxGeometry x="1201" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-91" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1241" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-92" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1281" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-93" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1321" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-94" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" parent="1" vertex="1">
|
||||
<mxGeometry x="1361" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-95" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" parent="1" vertex="1">
|
||||
<mxGeometry x="1401" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-96" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="1" vertex="1">
|
||||
<mxGeometry x="1441" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-97" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="1" vertex="1">
|
||||
<mxGeometry x="1481" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-98" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" parent="1" vertex="1">
|
||||
<mxGeometry x="1521" y="140" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-99" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" parent="1" vertex="1">
|
||||
<mxGeometry x="1160" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-100" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffcc99;strokeColor=#36393d;" parent="1" vertex="1">
|
||||
<mxGeometry x="1361" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-101" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1201" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-102" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffcc99;strokeColor=#36393d;" parent="1" vertex="1">
|
||||
<mxGeometry x="1441" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-103" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffcc99;strokeColor=#36393d;" parent="1" vertex="1">
|
||||
<mxGeometry x="1521" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-104" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" parent="1" vertex="1">
|
||||
<mxGeometry x="1241" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-105" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffcc99;strokeColor=#36393d;" parent="1" vertex="1">
|
||||
<mxGeometry x="1401" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-106" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="1" vertex="1">
|
||||
<mxGeometry x="1281" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-107" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffcc99;strokeColor=#36393d;" parent="1" vertex="1">
|
||||
<mxGeometry x="1481" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-108" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" parent="1" vertex="1">
|
||||
<mxGeometry x="1321" y="910" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-109" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" parent="1" vertex="1">
|
||||
<mxGeometry x="1160" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-110" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" parent="1" vertex="1">
|
||||
<mxGeometry x="1201" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-111" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1241" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-112" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1281" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-113" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1321" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-114" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" parent="1" vertex="1">
|
||||
<mxGeometry x="1361" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-115" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" parent="1" vertex="1">
|
||||
<mxGeometry x="1401" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-116" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="1" vertex="1">
|
||||
<mxGeometry x="1441" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-117" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="1" vertex="1">
|
||||
<mxGeometry x="1481" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-118" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" parent="1" vertex="1">
|
||||
<mxGeometry x="1521" y="420" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-119" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1100" y="439.71" as="sourcePoint" />
|
||||
<mxPoint x="1160" y="439.71" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-121" value="unique" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-119" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint x="13" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-122" value="" style="endArrow=classic;html=1;rounded=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1179.71" y="380" as="sourcePoint" />
|
||||
<mxPoint x="1179.71" y="420" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-123" value="seek" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-122" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-124" value="" style="endArrow=classic;html=1;rounded=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1381" y="659.97" as="sourcePoint" />
|
||||
<mxPoint x="1380.71" y="619.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-125" value="seek" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-124" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint y="-9" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-127" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" parent="1" vertex="1">
|
||||
<mxGeometry x="1160" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-128" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" parent="1" vertex="1">
|
||||
<mxGeometry x="1240.5" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-129" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1201" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-130" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1281" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-131" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1321" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-132" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" parent="1" vertex="1">
|
||||
<mxGeometry x="1361" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-133" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" parent="1" vertex="1">
|
||||
<mxGeometry x="1401" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-134" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="1" vertex="1">
|
||||
<mxGeometry x="1441" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-135" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="1" vertex="1">
|
||||
<mxGeometry x="1481" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-136" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" parent="1" vertex="1">
|
||||
<mxGeometry x="1521" y="250" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-141" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1160" y="310" as="sourcePoint" />
|
||||
<mxPoint x="1240" y="310" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-152" value="unique" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-141" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.1179" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-143" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1241" y="309.97" as="sourcePoint" />
|
||||
<mxPoint x="1360" y="310" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-144" value="re" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-143" vertex="1" connectable="0">
|
||||
<mxGeometry x="0.2536" y="-1" relative="1" as="geometry">
|
||||
<mxPoint x="-10" y="-1" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-146" value="repeated" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-143" vertex="1" connectable="0">
|
||||
<mxGeometry x="0.0852" y="-1" relative="1" as="geometry">
|
||||
<mxPoint x="-6" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-147" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1360" y="310" as="sourcePoint" />
|
||||
<mxPoint x="1560" y="310" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-148" value="re" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-147" vertex="1" connectable="0">
|
||||
<mxGeometry x="0.2536" y="-1" relative="1" as="geometry">
|
||||
<mxPoint x="-10" y="-1" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-149" value="un-processed" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-147" vertex="1" connectable="0">
|
||||
<mxGeometry x="0.0852" y="-1" relative="1" as="geometry">
|
||||
<mxPoint x="-6" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-153" value="" style="endArrow=classic;html=1;rounded=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1221" y="490" as="sourcePoint" />
|
||||
<mxPoint x="1220.71" y="460" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-156" value="limit" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-153" vertex="1" connectable="0">
|
||||
<mxGeometry x="0.1651" y="2" relative="1" as="geometry">
|
||||
<mxPoint x="2" y="3" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-157" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" parent="1" vertex="1">
|
||||
<mxGeometry x="1160" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-158" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" parent="1" vertex="1">
|
||||
<mxGeometry x="1321" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-159" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1201" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-160" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1241" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-161" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1281" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-162" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" parent="1" vertex="1">
|
||||
<mxGeometry x="1361" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-163" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" parent="1" vertex="1">
|
||||
<mxGeometry x="1401" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-164" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="1" vertex="1">
|
||||
<mxGeometry x="1441" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-165" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="1" vertex="1">
|
||||
<mxGeometry x="1481" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-166" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" parent="1" vertex="1">
|
||||
<mxGeometry x="1521" y="579.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-167" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1260.71" y="660" as="sourcePoint" />
|
||||
<mxPoint x="1260.21" y="619.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-168" value="unique" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-167" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint y="-9" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-172" value="" style="endArrow=classic;html=1;rounded=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1421" y="659.97" as="sourcePoint" />
|
||||
<mxPoint x="1420.71" y="619.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-173" value="limit" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-172" vertex="1" connectable="0">
|
||||
<mxGeometry x="0.1651" y="2" relative="1" as="geometry">
|
||||
<mxPoint x="2" y="3" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-179" value="" style="endArrow=classic;html=1;rounded=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1461" y="829.97" as="sourcePoint" />
|
||||
<mxPoint x="1460.71" y="789.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-180" value="seek" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-179" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint y="-9" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-181" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" parent="1" vertex="1">
|
||||
<mxGeometry x="1160" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-182" value="0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" parent="1" vertex="1">
|
||||
<mxGeometry x="1321" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-183" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1201" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-184" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1361" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-185" value="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="1" vertex="1">
|
||||
<mxGeometry x="1281" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-186" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" parent="1" vertex="1">
|
||||
<mxGeometry x="1401" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-187" value="2" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;fontColor=#ffffff;strokeColor=#6D1F00;" parent="1" vertex="1">
|
||||
<mxGeometry x="1241" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-188" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="1" vertex="1">
|
||||
<mxGeometry x="1441" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-189" value="3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="1" vertex="1">
|
||||
<mxGeometry x="1481" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-190" value="4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" parent="1" vertex="1">
|
||||
<mxGeometry x="1521" y="749.97" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-191" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1301.21" y="830" as="sourcePoint" />
|
||||
<mxPoint x="1300.71" y="789.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-192" value="unique" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-191" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.4214" relative="1" as="geometry">
|
||||
<mxPoint y="-9" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-193" value="" style="endArrow=classic;html=1;rounded=0;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1421" y="829.97" as="sourcePoint" />
|
||||
<mxPoint x="1420.71" y="789.97" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-194" value="limit" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-193" vertex="1" connectable="0">
|
||||
<mxGeometry x="0.1651" y="2" relative="1" as="geometry">
|
||||
<mxPoint x="2" y="3" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-195" value="" style="curved=1;endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;endFill=1;strokeColor=default;startArrow=classic;startFill=1;" parent="1" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1381" y="749.97" as="sourcePoint" />
|
||||
<mxPoint x="1250.5" y="749.97" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="1350" y="710" />
|
||||
<mxPoint x="1300" y="710" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="4gG0cXiCENDh7luhxtHf-196" value="swap" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4gG0cXiCENDh7luhxtHf-195" vertex="1" connectable="0">
|
||||
<mxGeometry x="0.1181" y="4" relative="1" as="geometry">
|
||||
<mxPoint x="12" y="-4" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
@ -1,37 +0,0 @@
|
||||
class Solution {
|
||||
|
||||
public void swap(int[] arr, int ind1, int ind2) {
|
||||
|
||||
int temp = arr[ind1];
|
||||
arr[ind1] = arr[ind2];
|
||||
arr[ind2] = temp;
|
||||
|
||||
}
|
||||
|
||||
public int removeDuplicates(int[] nums) {
|
||||
|
||||
int unique = 0;
|
||||
int seek = 0;
|
||||
|
||||
while (seek <= nums.length - 1) {
|
||||
// Initialize a limit pointer
|
||||
int limit = seek;
|
||||
// If limit is already on last element of array, look-ahead should be avoided
|
||||
// Till numbers repeat increment limit, else break
|
||||
while (limit < nums.length - 1 && nums[seek] == nums[limit + 1]) {
|
||||
limit = limit + 1;
|
||||
}
|
||||
// Swap the seek pointer value and the unique pointer value, then increment
|
||||
// unique pointer
|
||||
swap(nums, seek, unique);
|
||||
unique = unique + 1;
|
||||
// Move the seek pointer, only if end of array hasn't been reached
|
||||
if (limit == nums.length - 1) {
|
||||
break;
|
||||
} else {
|
||||
seek = limit + 1;
|
||||
}
|
||||
}
|
||||
return unique;
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
# Leetcode 150 Interview
|
||||
## [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/?envType=study-plan-v2&envId=top-interview-150)
|
||||
|
||||
## Deductions
|
||||
- The input array is sorted in an ascending order.
|
||||
- The duplicate elements need to be pushed to the back of the array, preferably by swapping, because the solution has to be in place.
|
||||
- The ordering of the repeated elements does not matter.
|
||||
- Numbers can be said to be existing in adjacent colonies, colonies of 0s, followed by colonies of 1s and so on, each colony comprises of either a single number or more.
|
||||
|
||||
## High Level Approach
|
||||
|
||||
- In the end we would want a divider, to the left of which we have only unique elements in an ascending order, to the right would be all the elemts in any-order.
|
||||
|
||||
- The divider would move only to the right, in a single pass, thus solving the problem with a proposed complexity of O(n)
|
||||
|
||||
- We can imagine a scenario where, where at any intermediate stage,
|
||||
our input array is divided into three parts, the first part carries all unique numbers in ascending order, the second part contains the repeated numbers and the third part contains numbers that haven't been processed yet. For 3 sections we need 2 pointers to act as dividers.
|
||||
|
||||
<p align="center"><img src="images/sections.png" width="50%" /></p>
|
||||
|
||||
- Let's start with 2 pointers, initially all at index 0,
|
||||
1. The unique pointer at 0, the left of which exist all unique numbers.
|
||||
2. The seek pointer, to the left upto ptr unique lie all repeated numbers, which also points to the first element of the number colony being processed.
|
||||
|
||||
- In order to process a colony the bounds of a colony must be known, we need to spawn a look-ahead pointer from the seek pointer that moves right to the last number of that colony, to determine the bounds of the colony.
|
||||
|
||||
<p align="center"><img src="images/initial pointer positions.png" width="50%" /></p>
|
||||
|
||||
- When processing a number colony, the first element moves to the unique section, the rest, if any move to the repeated section and then a new number colony is processed.
|
||||
|
||||
- When every colony is processed, atleast one unique element is addded, we swap the seek pointer value with the unique pointer value. The seek pointer always points to a new un-processed number and the unique pointer always points to the first number of the repeated section.
|
||||
|
||||
<p align="center"><img src="images/processing_a_number colony.png" width="50%" /></p>
|
||||
|
||||
- We have now added a value to the unique section thus we need to increment the unique pointer, the number at the seek pointer is a repeated value and hence the seek pointer must also be incremented, to the value next to the limit pointer, to the start of a new nunmber colony until, the end of the array is reached.
|
||||
|
||||
<p align="center"><img src="images/final stage.png" width="50%" /></p>
|
42
dsa/.gitignore
vendored
Normal file
42
dsa/.gitignore
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
.gradle
|
||||
build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
bin/
|
||||
!**/src/main/**/bin/
|
||||
!**/src/test/**/bin/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
3
dsa/.idea/.gitignore
generated
vendored
Normal file
3
dsa/.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
17
dsa/.idea/gradle.xml
generated
Normal file
17
dsa/.idea/gradle.xml
generated
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
7
dsa/.idea/misc.xml
generated
Normal file
7
dsa/.idea/misc.xml
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17 (2)" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
6
dsa/.idea/vcs.xml
generated
Normal file
6
dsa/.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
19
dsa/build.gradle
Normal file
19
dsa/build.gradle
Normal file
@ -0,0 +1,19 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
group = 'com.hithomelabs.dsa'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation platform('org.junit:junit-bom:5.10.0')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
BIN
dsa/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
dsa/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
6
dsa/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
dsa/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#Wed Feb 26 15:43:32 IST 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
234
dsa/gradlew
vendored
Executable file
234
dsa/gradlew
vendored
Executable file
@ -0,0 +1,234 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
89
dsa/gradlew.bat
vendored
Normal file
89
dsa/gradlew.bat
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
9
dsa/prompts/generate_code_packages_and interfaces.txt
Normal file
9
dsa/prompts/generate_code_packages_and interfaces.txt
Normal file
@ -0,0 +1,9 @@
|
||||
I am trying to check in my leetcode solutions to a gradle project . Help me reduce my manual work.
|
||||
|
||||
For each question present except the first one,
|
||||
|
||||
1. Create a new package for the problem inside /dsa/src/main/java with package name com.hithomelabs.dsa.array.<package_name> where package name is the name of the question in all lower case with '_' instead of spaces.
|
||||
|
||||
2. Create a new java file with a public class Solution as in the leetcode URL associated with each question.
|
||||
|
||||
3. Create a new java file for a package protected interface Solvable belonging to the above package with a method solve having the same return type and arguments as of the method present in the class Solution.
|
53
dsa/scripts/generate_leetcode_structure.py
Normal file
53
dsa/scripts/generate_leetcode_structure.py
Normal file
@ -0,0 +1,53 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
def create_package_structure(problem_name, method_signature):
|
||||
"""Creates the package structure for a LeetCode problem"""
|
||||
|
||||
# Convert problem name to package format (lowercase with underscores)
|
||||
package_name = problem_name.lower().replace(' ', '_')
|
||||
|
||||
# Base package path
|
||||
base_path = "dsa/src/main/java/com/hithomelabs/dsa/array"
|
||||
package_path = f"{base_path}/{package_name}"
|
||||
|
||||
# Create package directory
|
||||
os.makedirs(package_path, exist_ok=True)
|
||||
|
||||
# Create Solution.java
|
||||
solution_content = f"""package com.hithomelabs.dsa.array.{package_name};
|
||||
|
||||
public class Solution implements Solvable {{
|
||||
{method_signature} {{
|
||||
// TODO: Implement solution
|
||||
throw new UnsupportedOperationException("Not implemented yet");
|
||||
}}
|
||||
}}
|
||||
"""
|
||||
|
||||
# Create Solvable.java
|
||||
solvable_content = f"""package com.hithomelabs.dsa.array.{package_name};
|
||||
|
||||
interface Solvable {{
|
||||
{method_signature};
|
||||
}}
|
||||
"""
|
||||
|
||||
# Write files
|
||||
with open(f"{package_path}/Solution.java", "w") as f:
|
||||
f.write(solution_content)
|
||||
|
||||
with open(f"{package_path}/Solvable.java", "w") as f:
|
||||
f.write(solvable_content)
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 3:
|
||||
print("Usage: python generate_leetcode_structure.py \"Problem Name\" \"method_signature\"")
|
||||
sys.exit(1)
|
||||
|
||||
problem_name = sys.argv[1]
|
||||
method_signature = sys.argv[2]
|
||||
create_package_structure(problem_name, method_signature)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
2
dsa/settings.gradle
Normal file
2
dsa/settings.gradle
Normal file
@ -0,0 +1,2 @@
|
||||
rootProject.name = 'dsa'
|
||||
|
@ -0,0 +1,8 @@
|
||||
package com.hithomelabs.dsa.array.best_time_to_buy_and_sell_stock;
|
||||
|
||||
public class Solution implements Solvable {
|
||||
@Override
|
||||
public int solve(int[] prices) {
|
||||
// Implementation of the solution
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.hithomelabs.dsa.array.best_time_to_buy_and_sell_stock;
|
||||
|
||||
public interface Solvable {
|
||||
public int solve(int[] prices);
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
package com.hithomelabs.dsa.array.container_with_most_water;
|
||||
|
||||
public class Solution implements Solvable {
|
||||
@Override
|
||||
public int solve(int[] height) {
|
||||
// Implementation of the solution
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.hithomelabs.dsa.array.container_with_most_water;
|
||||
|
||||
public interface Solvable {
|
||||
public int solve(int[] height);
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.hithomelabs.dsa.array.product_of_array_except_self;
|
||||
|
||||
public class Solution implements Solvable {
|
||||
@Override
|
||||
public int[] solve(int[] nums) {
|
||||
// Implementation of the solution
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.hithomelabs.dsa.array.contains_duplicate;
|
||||
|
||||
public interface Solvable {
|
||||
public boolean solve(int[] nums);
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.hithomelabs.dsa.array.find_minimum_in_rotated_sorted_array;
|
||||
|
||||
public class Solution implements Solvable {
|
||||
@Override
|
||||
public int solve(int[] nums) {
|
||||
// Implementation of the solution
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.hithomelabs.dsa.array.find_minimum_in_rotated_sorted_array;
|
||||
|
||||
public interface Solvable {
|
||||
public int solve(int[] nums);
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.hithomelabs.dsa.array.maximum_product_subarray;
|
||||
|
||||
public class Solution implements Solvable {
|
||||
@Override
|
||||
public int solve(int[] nums) {
|
||||
// Implementation of the solution
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.hithomelabs.dsa.array.maximum_product_subarray;
|
||||
|
||||
public interface Solvable {
|
||||
public int solve(int[] nums);
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.hithomelabs.dsa.array.merge_intervals;
|
||||
|
||||
|
||||
public class Solution {
|
||||
public int[][] merge(int[][] intervals) {
|
||||
// Implementation of the merge function
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.hithomelabs.dsa.array.merge_intervals;
|
||||
|
||||
interface Solvable {
|
||||
int[][] solve(int[][] intervals);
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.hithomelabs.dsa.array.product_of_array_except_self;
|
||||
|
||||
public class Solution {
|
||||
// Method signature for the solution
|
||||
public int[] solve(int[] nums) {
|
||||
// Implementation here
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.hithomelabs.dsa.array.product_of_array_except_self;
|
||||
|
||||
public interface Solvable {
|
||||
public int[] solve(int[] nums);
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.hithomelabs.dsa.array.search_in_rotated_sorted_array;
|
||||
|
||||
public class Solution implements Solvable {
|
||||
@Override
|
||||
public int solve(int[] nums, int target) {
|
||||
// Implementation of the solution
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.hithomelabs.dsa.array.search_in_rotated_sorted_array;
|
||||
|
||||
public interface Solvable {
|
||||
public int solve(int[] nums, int target);
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.hithomelabs.dsa.array.three_sum;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Solution implements Solvable {
|
||||
@Override
|
||||
public List<List<Integer>> solve(int[] nums) {
|
||||
// Implementation of the solution
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.hithomelabs.dsa.array.three_sum;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface Solvable {
|
||||
public List<List<Integer>> solve(int[] nums);
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.hithomelabs.dsa.array.two_sum;
|
||||
import java.util.Map;
|
||||
|
||||
public class HashMapSolution implements Solvable {
|
||||
|
||||
@Override
|
||||
public int[] solve(int[] nums, int target) {
|
||||
// Create a map to store the numbers and their corresponding indices
|
||||
Map<Integer, Integer> map = new HashMap();
|
||||
|
||||
// Iterate through the array of numbers
|
||||
for (int i = 0; i < nums.length; i++){
|
||||
// Check if the complement (target - current number) exists in the map
|
||||
if (map.containsKey(target - nums[i])){
|
||||
// If found, return the indices of the current number and its complement
|
||||
int[] solution = {i, map.get(target - nums[i])};
|
||||
return solution;
|
||||
}
|
||||
else
|
||||
// If not found, add the current number and its index to the map
|
||||
map.put(nums[i], i);
|
||||
}
|
||||
// Return null if no solution is found
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.hithomelabs.dsa.array.two_sum;
|
||||
|
||||
class Solution {
|
||||
|
||||
private Solution solution = new HashMapSolution();
|
||||
|
||||
public int[] twoSum(int[] nums, int target) {
|
||||
return solution.solve(nums, target);
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.hithomelabs.dsa.array.two_sum;
|
||||
|
||||
public interface Solvable {
|
||||
public int[] solve(int[] nums, int target);
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.hithomelabs.dsa.array.best_time_to_buy_and_sell_stock;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
// https://example.com/best_time_to_buy_and_sell_stock
|
||||
public class SolutionTest {
|
||||
|
||||
|
||||
@Test
|
||||
void testSolve() {
|
||||
Solution solution = new Solution();
|
||||
|
||||
// Test case 1: Normal case with increasing prices
|
||||
int[] prices1 = {7, 1, 5, 3, 6, 4};
|
||||
assertEquals(5, solution.solve(prices1));
|
||||
|
||||
// Test case 2: Prices decrease
|
||||
int[] prices2 = {7, 6, 4, 3, 1};
|
||||
assertEquals(0, solution.solve(prices2));
|
||||
|
||||
// Test case 3: Prices are constant
|
||||
int[] prices3 = {5, 5, 5, 5, 5};
|
||||
assertEquals(0, solution.solve(prices3));
|
||||
|
||||
// Test case 4: Prices with a single day
|
||||
int[] prices4 = {1};
|
||||
assertEquals(0, solution.solve(prices4));
|
||||
|
||||
// Test case 5: Prices with two days, increasing
|
||||
int[] prices5 = {1, 2};
|
||||
assertEquals(1, solution.solve(prices5));
|
||||
|
||||
// Test case 6: Prices with two days, decreasing
|
||||
int[] prices6 = {2, 1};
|
||||
assertEquals(0, solution.solve(prices6));
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.hithomelabs.dsa.array.container_with_most_water;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class SolutionTest {
|
||||
@Test
|
||||
void testSolve() {
|
||||
Solution solution = new Solution();
|
||||
|
||||
// Test case 1: Example case
|
||||
int[] heights1 = {1,8,6,2,5,4,8,3,7};
|
||||
assertEquals(49, solution.solve(heights1));
|
||||
|
||||
// Test case 2: Minimum input
|
||||
int[] heights2 = {1, 1};
|
||||
assertEquals(1, solution.solve(heights2));
|
||||
|
||||
// Test case 3: All heights are the same
|
||||
int[] heights3 = {4, 4, 4, 4};
|
||||
assertEquals(12, solution.solve(heights3));
|
||||
|
||||
// Test case 4: Decreasing heights
|
||||
int[] heights4 = {5, 4, 3, 2, 1};
|
||||
assertEquals(6, solution.solve(heights4));
|
||||
|
||||
// Test case 5: Increasing heights
|
||||
int[] heights5 = {1, 2, 3, 4, 5};
|
||||
assertEquals(6, solution.solve(heights5));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
package com.hithomelabs.dsa.array.contains_duplicate;
|
||||
|
||||
|
||||
public class SolutionTest {
|
||||
@Test
|
||||
void testSolve() {
|
||||
Solution solution = new Solution();
|
||||
|
||||
// Test case 1: Example case with duplicates
|
||||
int[] nums1 = {1, 2, 3, 1};
|
||||
assertTrue(solution.containsDuplicate(nums1));
|
||||
|
||||
// Test case 2: No duplicates
|
||||
int[] nums2 = {1, 2, 3, 4};
|
||||
assertFalse(solution.containsDuplicate(nums2));
|
||||
|
||||
// Test case 3: All elements are the same
|
||||
int[] nums3 = {1, 1, 1, 1};
|
||||
assertTrue(solution.containsDuplicate(nums3));
|
||||
|
||||
// Test case 4: Empty array
|
||||
int[] nums4 = {};
|
||||
assertFalse(solution.containsDuplicate(nums4));
|
||||
|
||||
// Test case 5: Single element
|
||||
int[] nums5 = {1};
|
||||
assertFalse(solution.containsDuplicate(nums5));
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.hithomelabs.dsa.array.find_minimum_in_rotated_sorted_array;
|
||||
|
||||
|
||||
public class SolutionTest {
|
||||
@Test
|
||||
void testSolve() {
|
||||
Solution solution = new Solution();
|
||||
|
||||
// Test case 1: Normal case with rotation
|
||||
int[] nums1 = {3, 4, 5, 1, 2};
|
||||
assertEquals(1, solution.solve(nums1));
|
||||
|
||||
// Test case 2: Array not rotated
|
||||
int[] nums2 = {1, 2, 3, 4, 5};
|
||||
assertEquals(1, solution.solve(nums2));
|
||||
|
||||
// Test case 3: Array with one element
|
||||
int[] nums3 = {1};
|
||||
assertEquals(1, solution.solve(nums3));
|
||||
|
||||
// Test case 4: Array with two elements, rotated
|
||||
int[] nums4 = {2, 1};
|
||||
assertEquals(1, solution.solve(nums4));
|
||||
|
||||
// Test case 5: Array with duplicates
|
||||
int[] nums5 = {2, 2, 2, 0, 1, 2};
|
||||
assertEquals(0, solution.solve(nums5));
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.hithomelabs.dsa.array.maximum_product_subarray;
|
||||
|
||||
|
||||
public class SolutionTest {
|
||||
@Test
|
||||
void testSolve() {
|
||||
Solution solution = new Solution();
|
||||
|
||||
// Test case 1: Normal case with positive numbers
|
||||
int[] nums1 = {2, 3, -2, 4};
|
||||
assertEquals(6, solution.solve(nums1));
|
||||
|
||||
// Test case 2: Array with all negative numbers
|
||||
int[] nums2 = {-2, -3, -1};
|
||||
assertEquals(6, solution.solve(nums2));
|
||||
|
||||
// Test case 3: Array with a mix of positive and negative numbers
|
||||
int[] nums3 = {-2, 0, -1};
|
||||
assertEquals(0, solution.solve(nums3));
|
||||
|
||||
// Test case 4: Array with one element
|
||||
int[] nums4 = {3};
|
||||
assertEquals(3, solution.solve(nums4));
|
||||
|
||||
// Test case 5: Array with two elements, one negative
|
||||
int[] nums5 = {2, -5};
|
||||
assertEquals(2, solution.solve(nums5));
|
||||
|
||||
// Test case 6: Array with multiple zeros
|
||||
int[] nums6 = {0, 2, 0, 3, 0};
|
||||
assertEquals(6, solution.solve(nums6));
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.hithomelabs.dsa.array.merge_intervals;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
|
||||
public class SolutionTest {
|
||||
@Test
|
||||
void testMerge() {
|
||||
Solution solution = new Solution();
|
||||
|
||||
// Test case from the Leetcode URL for Merge Intervals
|
||||
int[][] intervals1 = {{1, 3}, {2, 6}, {8, 10}, {15, 18}};
|
||||
int[][] expected1 = {{1, 6}, {8, 10}, {15, 18}};
|
||||
int[][] result1 = solution.merge(intervals1);
|
||||
assertArrayEquals(expected1, result1);
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.hithomelabs.dsa.array.product_of_array_except_self;
|
||||
|
||||
|
||||
public class SolutionTest {
|
||||
@Test
|
||||
void testSolve() {
|
||||
Solution solution = new Solution();
|
||||
|
||||
// Test case 1: Normal case
|
||||
int[] nums1 = {1, 2, 3, 4};
|
||||
int[] expected1 = {24, 12, 8, 6};
|
||||
assertArrayEquals(expected1, solution.solve(nums1));
|
||||
|
||||
// Test case 2: Array with one element
|
||||
int[] nums2 = {5};
|
||||
int[] expected2 = {1};
|
||||
assertArrayEquals(expected2, solution.solve(nums2));
|
||||
|
||||
// Test case 3: Array with two elements
|
||||
int[] nums3 = {1, 2};
|
||||
int[] expected3 = {2, 1};
|
||||
assertArrayEquals(expected3, solution.solve(nums3));
|
||||
|
||||
// Test case 4: Array with zeros
|
||||
int[] nums4 = {0, 1, 2, 3};
|
||||
int[] expected4 = {6, 0, 0, 0};
|
||||
assertArrayEquals(expected4, solution.solve(nums4));
|
||||
|
||||
// Test case 5: Array with negative numbers
|
||||
int[] nums5 = {-1, -2, -3, -4};
|
||||
int[] expected5 = {-24, -12, -8, -6};
|
||||
assertArrayEquals(expected5, solution.solve(nums5));
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.hithomelabs.dsa.array.search_in_rotated_sorted_array;
|
||||
|
||||
|
||||
public class SolutionTest {
|
||||
@Test
|
||||
void testSolve() {
|
||||
Solution solution = new Solution();
|
||||
|
||||
// Test case 1: Normal case with rotation
|
||||
int[] nums1 = {4, 5, 6, 7, 0, 1, 2};
|
||||
int target1 = 0;
|
||||
assertEquals(4, solution.solve(nums1, target1));
|
||||
|
||||
// Test case 2: Target not present
|
||||
int[] nums2 = {4, 5, 6, 7, 0, 1, 2};
|
||||
int target2 = 3;
|
||||
assertEquals(-1, solution.solve(nums2, target2));
|
||||
|
||||
// Test case 3: Array with one element (target present)
|
||||
int[] nums3 = {1};
|
||||
int target3 = 1;
|
||||
assertEquals(0, solution.solve(nums3, target3));
|
||||
|
||||
// Test case 4: Array with one element (target not present)
|
||||
int[] nums4 = {1};
|
||||
int target4 = 0;
|
||||
assertEquals(-1, solution.solve(nums4, target4));
|
||||
|
||||
// Test case 5: Array is rotated at the pivot
|
||||
int[] nums5 = {3, 1};
|
||||
int target5 = 1;
|
||||
assertEquals(1, solution.solve(nums5, target5));
|
||||
|
||||
// Test case 6: Array is not rotated
|
||||
int[] nums6 = {1, 2, 3, 4, 5};
|
||||
int target6 = 3;
|
||||
assertEquals(2, solution.solve(nums6, target6));
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.hithomelabs.dsa.array.three_sum;
|
||||
import java.util.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class SolutionTest {
|
||||
@Test
|
||||
void testSolve() {
|
||||
Solution solution = new Solution();
|
||||
|
||||
// Test case 1: Normal case with positive numbers
|
||||
int[] nums1 = {1, 2, -2, -1};
|
||||
List<List<Integer>> expected1 = Arrays.asList(Arrays.asList(-2, -1, 1), Arrays.asList(-2, 1, 2));
|
||||
assertEquals(expected1, solution.solve(nums1));
|
||||
|
||||
// Test case 2: No solution
|
||||
int[] nums2 = {1, 2, 3};
|
||||
List<List<Integer>> expected2 = new ArrayList<>();
|
||||
assertEquals(expected2, solution.solve(nums2));
|
||||
|
||||
// Test case 3: Array with duplicates
|
||||
int[] nums3 = {0, 0, 0, 0};
|
||||
List<List<Integer>> expected3 = Arrays.asList(Arrays.asList(0, 0, 0));
|
||||
assertEquals(expected3, solution.solve(nums3));
|
||||
|
||||
// Test case 4: Mixed positive and negative numbers
|
||||
int[] nums4 = {-1, 0, 1, 2, -1, -4};
|
||||
List<List<Integer>> expected4 = Arrays.asList(Arrays.asList(-1, -1, 2), Arrays.asList(-1, 0, 1));
|
||||
assertEquals(expected4, solution.solve(nums4));
|
||||
|
||||
// Test case 5: All elements are zero
|
||||
int[] nums5 = {0, 0, 0};
|
||||
List<List<Integer>> expected5 = Arrays.asList(Arrays.asList(0, 0, 0));
|
||||
assertEquals(expected5, solution.solve(nums5));
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.hithomelabs.dsa.array.two_sum;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
||||
public class SolutionTest {
|
||||
@Test
|
||||
void testTwoSum() {
|
||||
// Test case 1: nums = [2, 7, 11, 15], target = 9
|
||||
int[] nums1 = {2, 7, 11, 15};
|
||||
int target1 = 9;
|
||||
int[] expected1 = {0, 1}; // indices of the numbers that add up to target
|
||||
assertArrayEquals(expected1, new HashMapSolution().solve(nums1, target1));
|
||||
|
||||
// Test case 2: nums = [3, 2, 4], target = 6
|
||||
int[] nums2 = {3, 2, 4};
|
||||
int target2 = 6;
|
||||
int[] expected2 = {1, 2}; // indices of the numbers that add up to target
|
||||
assertArrayEquals(expected2, new HashMapSolution().solve(nums2, target2));
|
||||
|
||||
// Test case 3: nums = [3, 3], target = 6
|
||||
int[] nums3 = {3, 3};
|
||||
int target3 = 6;
|
||||
int[] expected3 = {0, 1}; // indices of the numbers that add up to target
|
||||
assertArrayEquals(expected3, new HashMapSolution().solve(nums3, target3));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user