programming code

frndzzzzz i have a coding for bubble sort recursive method any one discuss with me

Replies

  • Anoop Kumar
    Anoop Kumar
    Try writing code on base of following algo
    #-Link-Snipped-#
    Pretty much simplified.
    for i = 1:n,
        swapped = false
        for j = n:i+1,
            if a[j] < a[j-1],
                swap a[j,j-1]
                swapped = true
        → invariant: a[1..i] in final position
        break if not swapped
    end
    Let us know if face any problem.
  • MohanKumar Jaganathan
    MohanKumar Jaganathan
    G.Durga SomeswaraRao
    frndzzzzz i have a coding for bubble sort recursive method any one discuss with me
    Hi Durga, Do you need the code or the logic to solve the above mentioned problem?

You are reading an archived discussion.

Related Posts

After the not too old news of a new battery technology for electric cars, the aviation industry seems to be the next to go green. A prototype hybrid-electric propulsion engine...
I am getting following output when i try loading X server on my system connected via SSH. Help me iterate this problem. Work's pending. Thanks.
Japanese multinational conglomerate Sony, in competition to iPad Pro and Samsung Galaxy tab pro, is allegedly launching a 12.9-inch display tablet. After the launch of Xperia Z2, Sony is supposedly...
Jivi Mobiles has now launched Jivi JSP Q56 which it claims to be the cheapest quad-core processor Android smartphone in India. The phone is priced at Rs. 4,399 and is...
While Apple’s CarPlay is already on its way, search-giant Google unveiled its Android OS for cars earlier in June 2014. What was expected to arrive by the end of 2014...