Skip to content

Commit 8e66ed3

Browse files
committed
Merge branch 'feature/readme' into develop
2 parents e198129 + 233728d commit 8e66ed3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ var list = Arrays.stream(arr).boxed().sorted().collect(Collectors.toCollection(A
156156

157157
- Advancing through an array, EPI#5.4: [c++](cpp-algorithm/src/array) | Advance through the array to the last index.
158158
- Arbitrary precision operation - increment an arbitrary-precision integer, EPI#5.2: [c++](cpp-algorithm/src/array)(`PlusOne`) | Add one to the number represented by the vector.
159-
- Arbitrary precision operation - add two arbitrary-precision integers: [c++](cpp-algorithm/src/array)((`StringAddition`)) | Add two numbers represented by strings.
159+
- Arbitrary precision operation - add two arbitrary-precision integers: [c++](cpp-algorithm/src/array)(`StringAddition`) | Add two numbers represented by strings.
160160
- Arbitrary precision operation - multiply two arbitrary-precision integers, EPI#5.3: [c++](cpp-algorithm/src/array)(`Multiply`) | Multiply two numbers represented by vectors.
161161
- Delete duplicates from a sorted array, EPI#5.5: [c++](cpp-algorithm/src/array)(`DeleteDuplicates`) | Delete duplicate elements in the array.
162162
- Delete duplicates from a sorted array: [c++](cpp-algorithm/src/array)(`DeleteDuplicateElements`) | Delete duplicate elements in the array.
@@ -260,7 +260,7 @@ algorithm DFS-VISIT(G, u):
260260
u.finished = time
261261
```
262262
263-
- Dijkstra's algorithm: [c++](cpp-algorithm/src/graph), [java](java-algorithm/src/main/java/com/example/algorithm/graph) | A single source shortest path algorithm that handle non-negative edge weights. It find the shortest path between two vertices in a graph.
263+
- Dijkstra's algorithm: [c++](cpp-algorithm/src/graph), [java](java-algorithm/src/main/java/com/example/algorithm/graph) | A single source the shortest path algorithm that handle non-negative edge weights. It find the shortest path between two vertices in a graph.
264264

265265
```txt
266266
algorithm Dijkstra(G, source):
@@ -994,9 +994,9 @@ list.sort(Comparator.comparingInt(String::length));
994994

995995
| **Case** | **Time complexity** | **Remarks** |
996996
| :---------- | :-----------------: | :-------------------------------------------------------------------------------------- |
997-
| **Best** | $O(n)$ | when the input list is already sorted in the desired order |
997+
| **Best** | $O(n)$ | when the input list is already sorted in the desired order (ascending or descending) |
998998
| **Worst** | $O(n^2)$ | when the input list is already sorted in the reverse order of the desired sorting order |
999-
| **Average** | $O(n^2)$ | |
999+
| **Average** | $O(n^2)$ | when the input list is in jumbled order |
10001000

10011001
- Bucket sort: [java](java-algorithm/src/main/java/com/example/algorithm/sort) | Bucket sort is a sorting algorithm that works by distributing the elements of an array into a number of buckets. Each bucket contains a range of values and the elements are sorted within these buckets using any of the suitable sorting algorithms (such as insertion sort, merge sort, selection sort).<br>(`n` is the number of elements and `k` is the number of buckets)
10021002

@@ -1008,11 +1008,11 @@ list.sort(Comparator.comparingInt(String::length));
10081008

10091009
- Counting sort: [java](java-algorithm/src/main/java/com/example/algorithm/sort) | Counting sort is a non-comparative sorting algorithm that sorts the elements of an array by counting the occurrences of each element in the array. The count is stored in an auxiliary array and the sorting is done by mapping the count as an index of the auxiliary array. It is used as a subroutine in radix sort.<br>(`n` is the number of elements and `k` is the range of input values)
10101010

1011-
| **Case** | **Time complexity** | **Remarks** |
1012-
| ----------- | :-----------------: | ---------------------------------------------------- |
1013-
| **Best** | $O(n + k)$ | when the input elements have a small range of values |
1014-
| **Worst** | $O(n + k)$ | when the input elements have a large range of values |
1015-
| **Average** | $O(n + k)$ | |
1011+
| **Case** | **Time complexity** | **Remarks** |
1012+
| ----------- | :-----------------: | ------------------------------------------------------- |
1013+
| **Best** | $O(n + k)$ | when the input elements have a small range of values |
1014+
| **Worst** | $O(n + k)$ | when the input elements have a large range of values |
1015+
| **Average** | $O(n + k)$ | when the elements are distributed randomly in the array |
10161016

10171017
- Heap sort: [java](java-algorithm/src/main/java/com/example/algorithm/sort) | Heap sort is a comparison-based sorting algorithm that uses a binary heap data structure to sort an array. It is used for the implementation of priority queue.<br>(`n` is the number of elements)
10181018

@@ -1062,7 +1062,7 @@ list.sort(Comparator.comparingInt(String::length));
10621062
- Merge two sorted arrays, EPI#13.2, LeetCode#merge-sorted-array: [c++](cpp-algorithm/src/sort)(`MergeTwoSortedArray`) | Merge two sorted array. Merge the second array into the first array.
10631063
- Partitioning and sorting an array with many repeated entries, EPI#13.9: [java](java-algorithm/src/main/java/com/example/algorithm/sort)(`GroupByAge`) | Given an array of objects with an age field, reorder the array so that objects of equal age appear together. They should be sorted in ascending order of age, and the order of objects with the same age is not important.
10641064
- Remove first-name duplicates, EPI#13.4: [c++](cpp-algorithm/src/sort)(`EliminateFirstNameDuplicate`) | Given an array of names, remove the duplicates of the first name.
1065-
- Salary threadhold, EPI#13.12: [java](java-algorithm/src/main/java/com/example/algorithm/sort)(`SalaryThreshold`) | Given an array of salaries and a budget, compute the salary cap so that the total salaries equal the budget.
1065+
- Salary threshold, EPI#13.12: [java](java-algorithm/src/main/java/com/example/algorithm/sort)(`SalaryThreshold`) | Given an array of salaries and a budget, compute the salary cap so that the total salaries equal the budget.
10661066
- Team photo day, EPI#13.10: [java](java-algorithm/src/main/java/com/example/algorithm/sort)(`SortPlayerByHeight`) | Given two arrays of numbers, for team photos, players are arranged in front and back rows and then photographed. The players in the back row must necessarily be taller than those in the front row. Additionally, all players in a row should belong to the same team.
10671067
- Union of intervals, EPI#13.8: [c++](cpp-algorithm/src/sort)(`UnionOfIntervals`) | Given a set of intervals, compute their union.
10681068

0 commit comments

Comments
 (0)