Implement and Visualize a Recursive Sort Algorithm (Advanced Programming) - Android Studio Tutorial

preview_player
Показать описание
In this video we will implement the recursive Merge Sort algorithm and visualize each step on the UI so that we can always see whats currently going on. This is a great opportunity to learn how more complex algorithms work and makes also a lot of fun :-). There are hundreds of algorithms which can be visualized like this so feel free to apply this logic to other algorithms.

Get the final source code here:

00:00 Introduction
01:32 Implementing Merge Sort
20:00 Visualizing the Algorithm
Рекомендации по теме
Комментарии
Автор

Thanks for the amazing video. It is indeed a bit hedonistic to combine algorithms with logic for visualizing them. :P

Here, at @23:01, imho, one single job was not enough to make this work.. So, for example, if there is an ongoing sort, and you click sort again, with one job we are going to have problems. Imho, we need one more job for the mergeSortUseCase() to prevent any problems. Otherwise, the mergeSortUseCase from the previous sort is going to keep running and can mess up the flow from the current sort.
Also, the field "value" in the enums, it seems like we didn't make us of it, given that enums have an "intrinsic" value to them (in a way?)... this is, for example when doing the sort.

rollebonmarquis
Автор

Thank you for your content, You're doing great.
I want to develop a project where I could transfer different data (texts, numbers) between two android devices. And I have a question. Perhaps you have worked with NFC before and can tell you how to implement it correctly. If not, maybe you could make a video in which you show by your personal example how you work with instructions for different technologies when you are learning something new.

ИляГорев
Автор

What other algorithms are you planning to teach?

saeednoshadi