09B String.Split(); Parallel Arrays; Bubble Sorts

preview_player
Показать описание
Microsoft Programming Lab-Based Learning class at South Mountain Community College: Unit 9 Video 2-- String.Split(); Parallel Arrays; Bubble Sorts (VB & C#) [Using the Split( ) method of the String class to separate comma-delimited values into an array; Working with Parallel Arrays; Understanding the Bubble Sort algorithm ] Instructor: Stephen F. Hustedde
Рекомендации по теме
Комментарии
Автор

Response (part 1): Of course - Bubble sorts can be written in any language - Use nested for loops with a nested if structure that swaps the elements if necessary using a temp variable. The outer 'for' loop iterates from 0 to one less than the last element (In C# using the length of the array - 2). The inner 'for' loop iterates from the outer counter value plus one to the last element (length of array - continued . . .

StephenHustedde
Автор

I dont think you can use comparison operators for string values

bokangkhumalo
Автор

It is a really good tutorial, it's a shame that you didn't include the c# code. I love the first concept; which is the parallel arrays; I didn't understand a bit the bubble sort. I really wish you included the c# code.

programmingjo
Автор

Response (part 2): . . . (length of array - 1). Then examine the two corresponding elements (e.g. array[i] > array[j]) depending on ascending or descending sorts and then swap values using a previously declared temp variable to hold the first value while you transfer the second to the first and then the temp to the second.

StephenHustedde
Автор

This is not compatible in C#, can you write same in c#?

nobelluk
visit shbcf.ru