PHP write Merge Sorting. Who can understand ?...

Source: Internet
Author: User
{Code ...}

The problem has been disabled. cause: the problem cannot obtain the exact result.

Reply content:

Generally, I can see that this type of code does not pass through the first off. First spelling, nonstandard code format, $ f, $ s, what is $ sf? This type of code is not easy to understand first.

A little dizzy. After reading it for a while, it seems that the merging process involves a bubble sort.

$ ArrayA = array (100,101, 3,103, 22,300,); $ arrayB = array (,); $ arrayMerge = array_merge ($ arrayA, $ arrayB); function bubbleSort ($ array) {$ count = count ($ array); for ($ I = 0; $ I <$ count-1; $ I ++) {// compare loops for ($ j = $ I + 1; $ j <$ count; $ j ++) {if ($ array [$ j]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.