Code Flu
Code Flu
  • 5
  • 22 328
Quick Sort Algorithm in C#
In this video I explain how the Quick Sort algorithm works, in a visual way. At the end of the video I also provide the implementation in C#.
If you like this video, please consider taking my course on Data Structures using C# and .NET Core 3.0:
www.udemy.com/course/data-structures-using-csharp-and-dotnet/?referralCode=16E87C0830C3900103AA
zhlédnutí: 8 025

Video

Merge Sort Algorithm in C#
zhlédnutí 7KPřed 4 lety
In this video I explain how the Merge Sort algorithm works, in a visual way. At the end of the video I also provide the implementation in C#. If you like this video, please consider taking my course on Data Structures using C# and .NET Core 3.0: www.udemy.com/course/data-structures-using-csharp-and-dotnet/?referralCode=16E87C0830C3900103AA
Insertion Sort Algorithm in C#
zhlédnutí 2,4KPřed 4 lety
In this video I explain how the Insertion Sort algorithm works, in a visual way. At the end of the video I also provide the implementation in C#. If you like this video, please consider taking my course on Data Structures using C# and .NET Core 3.0: www.udemy.com/course/data-structures-using-csharp-and-dotnet/?referralCode=16E87C0830C3900103AA
Selection Sort Algorithm in C#
zhlédnutí 1,4KPřed 4 lety
In this video I explain how the Selection Sort algorithm works, in a visual way. At the end of the video I also provide the implementation in C#. If you like this video, please consider taking my course on Data Structures using C# and .NET Core 3.0: www.udemy.com/course/data-structures-using-csharp-and-dotnet/?referralCode=16E87C0830C3900103AA
Bubble Sort Algorithm in C#
zhlédnutí 3,6KPřed 4 lety
In this video I explain how the Bubble Sort algorithm works, in a visual way. At the end of the video I also provide the implementation in C#. If you like this video, please consider taking my course on Data Structures using C# and .NET Core 3.0: www.udemy.com/course/data-structures-using-csharp-and-dotnet/?referralCode=16E87C0830C3900103AA

Komentáře

  • @unknownfactor6489
    @unknownfactor6489 Před 3 měsíci

    Finally a simple explenation with good visuals

  • @bogdan.vilimonovic
    @bogdan.vilimonovic Před 11 měsíci

    public static void MergeSort(int[] array, int left, int right) { if(left < right) { int middle = (left + (right - 1)) / 2 + 1; MergeSort(array, left, middle - 1); MergeSort(array, middle, right); Merge(array, left, middle, right); } } public static void Merge(int[] array, int left, int middle, int right) { int leftIterator, rightIterator, arrayIterator; int leftArrayLength = middle - left; int rightArrayLength = right - middle + 1; int[] leftArray = new int[leftArrayLength]; int[] rightArray = new int[rightArrayLength]; for(leftIterator = 0; leftIterator < leftArrayLength; leftIterator++) { leftArray[leftIterator] = array[left + leftIterator]; } for(rightIterator = 0; rightIterator < rightArrayLength; rightIterator++) { rightArray[rightIterator] = array[middle + rightIterator]; } leftIterator = 0; rightIterator = 0; arrayIterator = left; while(leftIterator < leftArrayLength && rightIterator < rightArrayLength) { if (leftArray[leftIterator] <= rightArray[rightIterator]) { array[arrayIterator++] = leftArray[leftIterator++]; } else { array[arrayIterator++] = rightArray[rightIterator++]; } } int remainderIterator; if(leftIterator == leftArrayLength) { for(remainderIterator = rightIterator; remainderIterator < rightArrayLength; remainderIterator++) { array[arrayIterator++] = rightArray[remainderIterator]; } } if(rightIterator == rightArrayLength) { for (remainderIterator = leftIterator; remainderIterator < leftArrayLength; remainderIterator++) { array[arrayIterator++] = leftArray[remainderIterator]; } } }

  • @ankursharma1461
    @ankursharma1461 Před 11 měsíci

    What an explanation, great, the best, I was looking for quicksort for the past 2 days, now I have understood, thank you.

  • @rainerzufall702
    @rainerzufall702 Před rokem

    wow, you are the true algorithm king! thank you so much

  • @adrien8768
    @adrien8768 Před rokem

    Can You shard this wpf code for displaying the algorithme. I want to make the same but in blazor ? Thanks

  • @flssh715
    @flssh715 Před rokem

    I have test tmrw, thank you so so so much love you

  • @okoronnamdi
    @okoronnamdi Před rokem

    Nice video well-done

  • @chisengalungu119
    @chisengalungu119 Před rokem

    What if i wanted it to arrange in discending order? please help)

    • @codeflu2460
      @codeflu2460 Před rokem

      In the partition function you need to replace if(a[i]<pivot) with if(a[i]>pivot)

    • @chisengalungu119
      @chisengalungu119 Před rokem

      @@codeflu2460 thank you very much. It worked. I had to change both the a[i]<pivot and a[i]>pivot.

    • @antonmartynenko8795
      @antonmartynenko8795 Před rokem

      How did you make visualization like this?

    • @codeflu2460
      @codeflu2460 Před rokem

      @@antonmartynenko8795 I wrote an app in WPF

  • @muradazimzadadev
    @muradazimzadadev Před 2 lety

    I got StackOverFlow exception

  • @ramzzyyyy
    @ramzzyyyy Před 2 lety

    🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

  • @mamdouheltawel3470
    @mamdouheltawel3470 Před 2 lety

    Thank you for your explanation

  • @mohammedbadran3813
    @mohammedbadran3813 Před 2 lety

    Thanks a lot

  • @yoavsutskover9582
    @yoavsutskover9582 Před 3 lety

    amazing video

  • @crimsn5473
    @crimsn5473 Před 3 lety

    amazing video, I'm sorry you don't have more views on this...