Skip to content

Commit 5d83cb3

Browse files
committed
Add links to Youtube solutions into javadoc of remaining tasks
1 parent 8a00f97 commit 5d83cb3

File tree

156 files changed

+361
-22
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+361
-22
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ they contain enough code which describes implementation in a natural way.
102102
| Быстрая сортировка (Quick sort) | [Youtube](https://youtu.be/lp1UsN1-_p4) | [Code](src/main/java/by/andd3dfx/sorting/QuickSort.java) |
103103
| Генерация перестановок (leetcode) | [Youtube](https://youtu.be/PyRnm2mFZbk) | [Code](src/main/java/by/andd3dfx/common/Permutations.java) |
104104
| Интерполяционный поиск в упорядоченном массиве | [Youtube](https://youtu.be/kRTntkCB_a4) | [Code](src/main/java/by/andd3dfx/search/InterpolationSearch.java) |
105-
| Птицеферма (с элементами ООП) | [Youtube](https://youtu.be/tQAJRQrc2Aw) | [Code](src/main/java/by/andd3dfx/common/birdsfarm) |
105+
| Птицеферма (с элементами ООП) | [Youtube](https://youtu.be/tQAJRQrc2Aw) | [Code](src/main/java/by/andd3dfx/common/birdsfarm/README.MD) |
106106
| Определение более длинного конца цепи | [Youtube](https://youtu.be/KAqZwNY7yUc) | [Code](src/main/java/by/andd3dfx/common/ChainLink.java) |
107107
| Прыжки по разрушающимся платформам | [Youtube](https://youtu.be/okH8weUwc8k) | [Code](src/main/java/by/andd3dfx/common/Platformer.java) |
108108
| Сортировка квадратов упорядоченного массива (3 способа) (leetcode) | [Youtube](https://youtu.be/49DpyzZN4NM) | [Code](src/main/java/by/andd3dfx/common/SortedSquares.java) |
@@ -159,13 +159,13 @@ they contain enough code which describes implementation in a natural way.
159159
| Распространение чумы между городами (2 решения) | [Youtube](https://youtu.be/Ei1uCCD_Iqg) | [Code](src/main/java/by/andd3dfx/common/InfectionDistribution.java) |
160160
| Реверсирование порядка цифр в числе (2 решения) | [Youtube](https://youtu.be/w3C4L7GxD7M) | [Code](src/main/java/by/andd3dfx/numeric/ReverseDigitsOrder.java) |
161161
| Поиск среди пар чисел значения, встречающегося однажды: магия XOR (2 решения) (leetcode) | [Youtube](https://youtu.be/dNB8tOvx5Gk) | [Code](src/main/java/by/andd3dfx/numeric/FindNumberWhichAppearsOnce.java) |
162-
| Удаление дубликатов в сортированном связном списке (2 задачи) (leetcode) | [Youtube](https://youtu.be/ryE_Q_AtAg8) | [Code](src/main/java/by/andd3dfx/collections/RemoveDuplicatesFromSortedLinkedList.java) [Code2](src/main/java/by/andd3dfx/collections/RemoveDuplicatesFromSortedLinkedList_II.java) |
162+
| Удаление дубликатов в сортированном связном списке ч.I,II (leetcode) | [Youtube](https://youtu.be/ryE_Q_AtAg8) | [Code](src/main/java/by/andd3dfx/collections/RemoveDuplicatesFromSortedLinkedList.java) [Code2](src/main/java/by/andd3dfx/collections/RemoveDuplicatesFromSortedLinkedList_II.java) |
163163
| Генерация валидных комбинаций скобок (leetcode) | [Youtube](https://youtu.be/UMBenJ4PZKU) | [Code](src/main/java/by/andd3dfx/common/GenerateParentheses.java) |
164164
| Валидация записи числа регулярным выражением (leetcode) | [Youtube](https://youtu.be/Xy0iJ7w_UO8) | [Code](src/main/java/by/andd3dfx/numeric/ValidNumber.java) |
165165
| Проверка, является ли число степенью заданного числа (2 решения) (leetcode) | [Youtube](https://youtu.be/E1Gue5EcvK4) | [Code](src/main/java/by/andd3dfx/numeric/PowerOfThree.java) |
166166
| Прокрутка односвязного списка (leetcode) | [Youtube](https://youtu.be/6tyflwO6PwY) | [Code](src/main/java/by/andd3dfx/collections/RotateLinkedList.java) |
167167
| Поиск подстроки в строке за O(N+M): алгоритм Бойера-Мура (2 решения) (leetcode) | [Youtube](https://youtu.be/77fzfJIs_YY) | [Code](src/main/java/by/andd3dfx/string/boyermoore/FindSubstringBoyerMoore.java) [Code2](src/main/java/by/andd3dfx/string/boyermoore/FindSubstringBoyerMooreEnhanced.java) |
168-
| Задачи из интервью на написание SQL-запросов | [Youtube](https://youtu.be/GjDF_LdwYHU) | [Code](sql) |
168+
| Задачи из интервью на написание SQL-запросов | [Youtube](https://youtu.be/GjDF_LdwYHU) | [Code](sql/README.md) |
169169
| Поиск слова в матрице букв (leetcode) | [Youtube](https://youtu.be/FsKU04anMtE) | [Code](src/main/java/by/andd3dfx/search/wordsearch/WordSearch.java) |
170170
| Сжатие строки (Яндекс) | [Youtube](https://youtu.be/s3sGF7C6cV8) | [Code](src/main/java/by/andd3dfx/string/MakeStringCompact.java) |
171171
| Самодельный Stack | [Youtube](https://youtu.be/sZ-DrSHhrWc) | [Code](src/main/java/by/andd3dfx/collections/custom/CustomStack.java) |
@@ -184,7 +184,7 @@ they contain enough code which describes implementation in a natural way.
184184
| Сортировка Шелла (Shell sort) | [Youtube](https://youtu.be/1wyVIGI7EX8) | [Code](src/main/java/by/andd3dfx/sorting/ShellSort.java) |
185185
| Размен минимальным количеством монет (2 решения) | [Youtube](https://youtu.be/K1xPbYPslRU) | [Code](src/main/java/by/andd3dfx/dynamic/ChangeWithMinNumberOfCoins.java) |
186186
| Замена всех '?' в строке, избегая повторяющихся последовательных символов (leetcode) | [Youtube](https://youtu.be/OgMnvWfhqrk) | [Code](src/main/java/by/andd3dfx/string/ReplaceQCharToAvoidConsecutiveRepeatingChars.java) |
187-
| Заказ фурнитуры: добавить пропущенный код | [Youtube](https://youtu.be/TNgR6JaxwFg) | [Code](src/main/java/by/andd3dfx/common/furniture) |
187+
| Заказ фурнитуры: добавить пропущенный код | [Youtube](https://youtu.be/TNgR6JaxwFg) | [Code](src/main/java/by/andd3dfx/common/furniture/README.md) |
188188
| Поиск в сортированном массиве количества элементов меньших заданного (3 решения) | [Youtube](https://youtu.be/a2dvtrdi1YI) | [Code](src/main/java/by/andd3dfx/search/FindAmountOfElementsLessThan.java) |
189189
| Факториал (4 решения) | [Youtube](https://youtu.be/HZrTppQjXVs) | [Code](src/main/java/by/andd3dfx/numeric/factorial) |
190190
| Вычисление среднего, медианы, моды, квартилей | [Youtube](https://youtu.be/nqalmvHE_-A) | [Code](src/main/java/by/andd3dfx/numeric/MeanMedianMode.java) |

sql/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@
2020
- [14. Поиск сотрудника с второй по величине зарплатой](14.sql)
2121
- [15. Задача о пользователях и их телефонах](15.sql)
2222
- [16. Задача про стадионы и матчи](16.sql)
23+
24+
See [video solutions](https://youtu.be/GjDF_LdwYHU) of these tasks on YouTube

src/main/java/by/andd3dfx/annotation/CustomClassAnnotation.java

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import java.lang.annotation.RetentionPolicy;
66
import java.lang.annotation.Target;
77

8+
/**
9+
* @see <a href="https://youtu.be/ERKYwftYjtk">Video solution</a>
10+
*/
811
@Retention(RetentionPolicy.RUNTIME)
912
@Target(ElementType.TYPE)
1013
public @interface CustomClassAnnotation {

src/main/java/by/andd3dfx/annotation/CustomMethodAnnotation.java

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import java.lang.annotation.RetentionPolicy;
66
import java.lang.annotation.Target;
77

8+
/**
9+
* @see <a href="https://youtu.be/ERKYwftYjtk">Video solution</a>
10+
*/
811
@Retention(RetentionPolicy.RUNTIME)
912
@Target(ElementType.METHOD)
1013
public @interface CustomMethodAnnotation {

src/main/java/by/andd3dfx/cache/LFUCache.java

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* Note that the number of times an item is used is the number of calls to the get and put functions
2929
* for that item since it was inserted. This number is set to zero when the item is removed.
3030
* </pre>
31+
*
32+
* @see <a href="https://youtu.be/4hhu0cSVUCA">Video solution</a>
3133
*/
3234
@Slf4j
3335
@RequiredArgsConstructor

src/main/java/by/andd3dfx/cache/LRUCache.java

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
*
2323
* The cache is initialized with a positive capacity.
2424
* <pre/>
25+
*
26+
* @see <a href="https://youtu.be/ZrF5s4_jNZk">Video solution</a>
2527
*/
2628
@RequiredArgsConstructor
2729
public class LRUCache {

src/main/java/by/andd3dfx/collections/DeleteNthElementFromLinkedListEnd.java

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import lombok.AllArgsConstructor;
44
import lombok.Data;
55

6+
/**
7+
* @see <a href="https://youtu.be/1cn_3eCvnq0">Video solution</a>
8+
*/
69
public class DeleteNthElementFromLinkedListEnd {
710

811
@Data

src/main/java/by/andd3dfx/collections/LoopInLinkedList.java

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
/**
77
* Find loop in the linked list
8+
*
9+
* @see <a href="https://youtu.be/5IcvvtfLGvM">Video solution</a>
810
*/
911
public class LoopInLinkedList {
1012

src/main/java/by/andd3dfx/collections/RemoveDuplicatesFromSortedArray.java

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
* respectively.
3030
* It does not matter what you leave beyond the returned k (hence they are underscores).
3131
* </pre>
32+
*
33+
* @see <a href="https://youtu.be/gbReaBoFHkc">Video solution</a>
3234
*/
3335
public class RemoveDuplicatesFromSortedArray {
3436

src/main/java/by/andd3dfx/collections/RemoveDuplicatesFromSortedArray_II.java

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
* respectively.
3434
* It does not matter what you leave beyond the returned k (hence they are underscores).
3535
* </pre>
36+
*
37+
* @see <a href="https://youtu.be/gbReaBoFHkc">Video solution</a>
3638
*/
3739
public class RemoveDuplicatesFromSortedArray_II {
3840

src/main/java/by/andd3dfx/collections/RemoveDuplicatesFromSortedLinkedList.java

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*
1919
* The list is guaranteed to be sorted in ascending order.
2020
* </pre>
21+
*
22+
* @see <a href="https://youtu.be/ryE_Q_AtAg8">Video solution</a>
2123
*/
2224
public class RemoveDuplicatesFromSortedLinkedList {
2325

src/main/java/by/andd3dfx/collections/RemoveDuplicatesFromSortedLinkedList_II.java

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*
2222
* The list is guaranteed to be sorted in ascending order.
2323
* </pre>
24+
*
25+
* @see <a href="https://youtu.be/ryE_Q_AtAg8">Video solution</a>
2426
*/
2527
public class RemoveDuplicatesFromSortedLinkedList_II {
2628

src/main/java/by/andd3dfx/collections/ReverseAnySequence.java

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
/**
88
* Examples how to reverse any list using different methods
9+
*
10+
* @see <a href="https://youtu.be/Ql6JGqcSiNk">Video solution</a>
911
*/
1012
public class ReverseAnySequence {
1113

src/main/java/by/andd3dfx/collections/ReverseLinkedList.java

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
import java.util.ArrayDeque;
77
import java.util.Deque;
88

9+
/**
10+
* @see <a href="https://youtu.be/iEKdRgKNurg">Video solution</a>
11+
*/
912
public class ReverseLinkedList {
1013

1114
@Data

src/main/java/by/andd3dfx/collections/RotateLinkedList.java

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* Input: head = [0,1,2], k = 4
2020
* Output: [2,0,1]
2121
* </pre>
22+
*
23+
* @see <a href="https://youtu.be/6tyflwO6PwY">Video solution</a>
2224
*/
2325
public class RotateLinkedList {
2426

src/main/java/by/andd3dfx/collections/StackWithMinSupportO1.java

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
*
1414
* push() and getMin() should have O(1) complexity.
1515
* </pre>
16+
*
17+
* @see <a href="https://youtu.be/-Y-_0R8tfyk">Video solution</a>
1618
*/
1719
public class StackWithMinSupportO1 {
1820

src/main/java/by/andd3dfx/collections/custom/CustomArrayList.java

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import java.util.Arrays;
66
import java.util.Iterator;
77

8+
/**
9+
* @see <a href="https://youtu.be/u7Vyh567ljs">Video solution</a>
10+
*/
811
public class CustomArrayList<T> implements Iterable<T> {
912

1013
private static final int DEFAULT_INITIAL_SIZE = 10;

src/main/java/by/andd3dfx/collections/custom/CustomHashMap.java

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
import java.util.Iterator;
44
import java.util.NoSuchElementException;
55

6+
/**
7+
* @param <K> key
8+
* @param <V> value
9+
*
10+
* @see <a href="https://youtu.be/-GECqwRV8Uw">Video solution</a>
11+
*/
612
public class CustomHashMap<K, V> {
713

814
private static final int BUCKETS_COUNT = 16;

src/main/java/by/andd3dfx/collections/custom/CustomHashSet.java

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import java.util.Collection;
44
import java.util.Iterator;
55

6+
/**
7+
* @see <a href="https://youtu.be/aTbKxApYNYk">Video solution</a>
8+
*/
69
public class CustomHashSet<T> implements Iterable<T> {
710

811
private CustomHashMap<T, Object> map = new CustomHashMap<>();

src/main/java/by/andd3dfx/collections/custom/CustomLinkedHashSet.java

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import java.util.Iterator;
44

5+
/**
6+
* @see <a href="https://youtu.be/GlV87RWHhOQ">Video solution</a>
7+
*/
58
public class CustomLinkedHashSet<T> extends CustomHashSet<T> {
69

710
private CustomLinkedList<T> linkedList = new CustomLinkedList<>();

src/main/java/by/andd3dfx/collections/custom/CustomLinkedList.java

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
import java.util.Iterator;
66

7+
/**
8+
* @see <a href="https://youtu.be/vHjvNHBQP3o">Video solution</a>
9+
*/
710
public class CustomLinkedList<T> implements Iterable<T> {
811

912
@AllArgsConstructor

src/main/java/by/andd3dfx/collections/custom/CustomStack.java

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import java.util.NoSuchElementException;
44

5+
/**
6+
* @see <a href="https://youtu.be/sZ-DrSHhrWc">Video solution</a>
7+
*/
58
public class CustomStack<T> {
69

710
private final CustomLinkedList<T> linkedList = new CustomLinkedList<>();

src/main/java/by/andd3dfx/common/ATM.java

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
* Надо реализовать метод withdraw() для выдачи заданной суммы amount имеющимися в банкомате купюрами.
1212
* Метод withdraw() - мутирующий, т.е. меняет состояние банкомата после вызова (кол-во купюр может уменьшиться).
1313
* </pre>
14+
*
15+
* @see <a href="https://youtu.be/LDKZtDevRRI">Video solution</a>
1416
*/
1517
public class ATM {
1618

src/main/java/by/andd3dfx/common/ArrayRanges.java

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* [1,4,3,2] => "1-4"
1515
* [1,4] => "1,4"
1616
* </pre>
17+
*
18+
* @see <a href="https://youtu.be/ql6TROfbnYk">Video solution</a>
1719
*/
1820
public class ArrayRanges {
1921

src/main/java/by/andd3dfx/common/ArraysUnion.java

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
/**
99
* Даны 2 упорядоченных массива с уникальными элементами,
1010
* найти и вывести их упорядоченное объединение без дубликатов.
11+
*
12+
* @see <a href="https://youtu.be/uABGnnTD0Kw">Video solution</a>
1113
*/
1214
public class ArraysUnion {
1315

src/main/java/by/andd3dfx/common/BracketsExpressionValidator.java

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* ([{}]) -> true
1717
* ([)] -> false
1818
* </pre>
19+
*
20+
* @see <a href="https://youtu.be/4kimh-Gsuxs">Video solution</a>
1921
*/
2022
public class BracketsExpressionValidator {
2123

src/main/java/by/andd3dfx/common/Candies.java

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
* - Eat 2, Get 1, Remaining 1
1212
* - Eat 1
1313
* </pre>
14+
*
15+
* @see <a href="https://youtu.be/UNz2nM2qQ3E">Video solution</a>
1416
*/
1517
public class Candies {
1618

src/main/java/by/andd3dfx/common/ChainLink.java

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* middle.append(right);
1818
* System.out.println(left.longerSide());
1919
* </pre>
20+
*
21+
* @see <a href="https://youtu.be/KAqZwNY7yUc">Video solution</a>
2022
*/
2123
public class ChainLink {
2224

src/main/java/by/andd3dfx/common/ClimbingStairs.java

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* Constraints:
2929
* 1 <= n <= 45
3030
* </pre>
31+
*
32+
* @see <a href="https://youtu.be/bjE3KQM4ko4">Video solution</a>
3133
*/
3234
public class ClimbingStairs {
3335

src/main/java/by/andd3dfx/common/CountStreamers.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
* Вам дан массив (неупорядоченный) из пар (t_in, t_out) – длина массива от 0 до 10^6.
2323
* Требуется вывести число – максимальное количество пользователей,
2424
* которые одновременно смотрели стрим.
25+
* </pre>
2526
*
2627
* @see <a href="https://youtu.be/uMikT-xpE-w">Video solution</a>
27-
* </pre>
2828
*/
2929
public class CountStreamers {
3030

src/main/java/by/andd3dfx/common/DoorNBox.java

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* Имеется коробка со сторонами: A × B × C.
88
* Определить, пройдёт ли она в дверь с размерами M × K.
99
* </pre>
10+
*
11+
* @see <a href="https://youtu.be/ix81AbCNiBE">Video solution</a>
1012
*/
1113
public class DoorNBox {
1214

src/main/java/by/andd3dfx/common/DoorsNKeys.java

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
*
1414
* Можете ли вы открыть все двери?
1515
* </pre>
16+
*
17+
* @see <a href="https://youtu.be/ix81AbCNiBE">Video solution</a>
1618
*/
1719
public class DoorsNKeys {
1820

src/main/java/by/andd3dfx/common/FileSystemPath.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import java.util.Deque;
77

88
/**
9-
* Write a function that provides change directory (cd) function for an abstract file system.
109
* <pre>
10+
* Write a function that provides change directory (cd) function for an abstract file system.
1111
* Notes:
1212
* Root path is '/'.
1313
* Path separator is '/'.
@@ -24,6 +24,8 @@
2424
*
2525
* should display '/a/b/c/x'.
2626
* </pre>
27+
*
28+
* @see <a href="https://youtu.be/HLoLoIaL--I">Video solution</a>
2729
*/
2830
public class FileSystemPath {
2931

src/main/java/by/andd3dfx/common/GenerateParentheses.java

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
* Constraints:
2626
* 1 <= n <= 8
2727
* <pre/>
28+
*
29+
* @see <a href="https://youtu.be/UMBenJ4PZKU">Video solution</a>
2830
*/
2931
public class GenerateParentheses {
3032

0 commit comments

Comments
 (0)