GithubHelp home page GithubHelp logo

Bubble sort about hacktoberfest HOT 5 CLOSED

Srujan-Rao avatar Srujan-Rao commented on July 20, 2024
Bubble sort

from hacktoberfest.

Comments (5)

Samar1110 avatar Samar1110 commented on July 20, 2024

Hello Srujan Rao, can i submit a PR on this issue ?

from hacktoberfest.

avigarg820 avatar avigarg820 commented on July 20, 2024

``from sys import stdin

def bubbleSort(arr, n) :
for i in range(n-1):
for j in range(n-i-1):
if arr[j]> arr[j+1]:
temp = arr[j]
arr[j]= arr[j+1]
arr[j+1] = temp

#Taking Input Using Fast I/O
def takeInput() :
n = int(stdin.readline().strip())
if n == 0 :
return list(), 0

arr = list(map(int, stdin.readline().strip().split(" ")))
return arr, n

#to print the array/list
def printList(arr, n) :
for i in range(n) :
print(arr[i], end = " ")
print()

#main
t = int(stdin.readline().strip())

while t > 0 :

arr, n = takeInput()
bubbleSort(arr, n)
printList(arr, n)

t-= 1

from hacktoberfest.

avigarg820 avatar avigarg820 commented on July 20, 2024

add bubble sort

I am submitting a code of bubble sort in python. I hope it is ok

from hacktoberfest.

harshhes avatar harshhes commented on July 20, 2024

hey there can i add bubble sort in python solution?

from hacktoberfest.

Yashmittal01 avatar Yashmittal01 commented on July 20, 2024

please assign it to me

from hacktoberfest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.