MUMUBugMerge SortThe principle of merge sort is quite simple.Take advantage of the fact that combining two sorted arrays has O(n) time complexity,using…1 min read·Dec 9, 2021----
MUMUBug1217. Minimum Cost to Move Chips to The Same Position(easy)We have n chips, where the position of the ith chip is position[i].2 min read·Dec 6, 2021----
MUMUBugSelection SortThe principle of selection sort is — select the smallest value in unsorted array, and then swap it with the left most value in this…1 min read·Dec 6, 2021----
MUMUBugInsertion SortInsertion sort is a little bit more efficient than bubble sort in practice.1 min read·Dec 6, 2021----
MUMUBugBubble SortCompare adjacent elements and swaps them if they are in the wrong order.1 min read·Dec 3, 2021----
MUMUBug152. Maximum Product Subarray(Medium)Given an integer array nums, find a contiguous non-empty subarray within the array that has the largest product, and return the product.1 min read·Dec 3, 2021----