Back to Browse

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

2.8K views
Oct 12, 2015
13:02

C# Programming Challenge: Searching and Sorting Part 2 (C# linear & binary search, C# bubble and selection sort) We code our linear search algorithm and array of objects for future use. We also demonstrate that the linear search algorith works. 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! DOWNLOAD SOURCE CODE: http://www.codinghomework.com/?p=925

Download

0 formats

No download links available.

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