Feedback
Recursion
Sorting
Help for exercises
Good idea.
I can try to choose topics/examples. Of course the best, if you can ask.
Link to forms on tofferi.fi/dsa
Books (online or paper)
Youtube: Mark Lewis, Scala language
Main part of the Course, don't underestimate time required.
Don't underestimate how much that helps you to learn!
Use others to help you.
If you have 1h - 1,5h time to do exercise every second day, you can do well. You can do as follows:
Loop is not always easy for repetitive tasks!
Recursion is not extremely difficult, it is only less used
Let's print numbers factors with recursion
Idea:
Now we try to learn how to follow a call stack
We try to print numbers 1, 2 and 3 in two orders
We can try to follow recursion where is fibonacci numbers
Multiple recursive calls allows more powerful structures
Bubble Sort - Selection Sort - Insertion Sort - Merge Sort - Quick Sort - Heap Sort - Radix Sort - Bucket Sort - Shell Sort - Counting Sort - Tim Sort - Comb Sort - Pigeonhole Sort - Cycle Sort - Cocktail Shaker Sort - Gnome Sort - Tree Sort - Bitonic Sort - Pancake Sort - Stooge Sort
We can try to understand code together
void ShellSort(int[] arr) { int n = arr.Length; int gap = n / 2; while (gap > 0) { for (int i = gap; i < n; i++) { int temp = arr[i]; int j = i; while (j >= gap && arr[j - gap] > temp) { arr[j] = arr[j - gap]; j -= gap; } arr[j] = temp; } gap /= 2; } }
Read/start exercises today, rest overnight, try again
Use pencil and paper
Try to learn follow a code