C# Programming Challenge: Searching & Sorting Part 4 linear & binary search, bubble & selection sort

preview_player
Показать описание
C# Programming Challenge: Searching and Sorting Part 4 (C# linear & binary search, C# bubble and selection sort)

We conclude by coding binary search and compare searching capabilities of the binary search vs the linear search.

Create a class named "SearchCount". It includes an array of 20 elements (int type) and a variable named counter. It also includes constructors, properties, and four functions: liner search, binary search, bubble ascending sorting, and selection descending sort.

Create a class named "SearchCountDemo". In the main function, read the data from file and create an array of objects with three elements to save the data.

Search number 26 using:
element 1. liner search
element 2. bubble ascending sorting - binary search
element 3. selection descending sort - binary search

Keep counters for each function and print out the number of searching step for comparison.

Learning to code? Follow my C# tutorials for beginners. I do a lot of C# programming challenges and C# projects as part of my homework - every day!
If you are learning to program, nothing beats solving real programming exercises and coding challenges.
So don't forget to subscribe, as I release several programming videos every week!

Рекомендации по теме
Комментарии
Автор

How can i wirte the sorted list back to the text file ?

dogusural
visit shbcf.ru