Frequently Asked Java Program 22: Sort Elements in Array | Bubble Sort
ฝัง
- เผยแพร่เมื่อ 16 ต.ค. 2019
- Topics :
-----------
1)Sort Elements in Array
2) Bubble Sort
#########################
Udemy Courses:
#########################
Manual Testing+Agile with Jira Tool
************************************
► shorturl.at/xNXZ4
Selenium with Java+Cucumber
********************************
► shorturl.at/aIKMW
Selenium with Python & PyTest
********************************
► shorturl.at/ELW09
Selenium with python using Robot framework
****************************************
► shorturl.at/bcDPZ
API Testing(Postman, RestAssured & SoapUI)
*****************************************
► shorturl.at/uAWY7
Web & API Automation using Cypress with Javascript
********************************************
► rb.gy/4uum2n
Playwright with Javascript
**************************
► shorturl.at/gALZ1
Jmeter-Performance Testing
************************
► rb.gy/ocj7r2
SDET Essencials(Full Stack QA)
*************************
► rb.gy/hlnf2v
Appium-Mobile Automation Testing
************************************
► rb.gy/wmzv64
Java Collections
*****************
► bit.ly/3S66ezE
Python Programming
*********************
► urlis.net/gdsfpb0s
Cucumber BDD Framework
***************************
► bit.ly/3F7d69r
Protractor with Javascript
***************************
► urlis.net/4uddm1qb
####################################
TH-cam Playlists:
####################################
Manual Testing & Agile
***********************
► bit.ly/3ujvaYa
► bit.ly/3OYzxQj
SQL
*************************
► bit.ly/3R6XjeG
► bit.ly/3nE0a1s
► bit.ly/3IeKuuJ
linux & Shell Scripting
**********************
► bit.ly/3up1Z6a
► bit.ly/3nzvGxx
Java
**********************
► bit.ly/3R9QfOs
► bit.ly/3AoRMKM
► bit.ly/3IbTTDn
► bit.ly/3ybXInv
► bit.ly/3yCoHdw
Selenium With Java+Cucumber
********************************
► bit.ly/3P2FMm4
► bit.ly/3yhiIt4
► bit.ly/3uokzet
► bit.ly/3a7XIND
► bit.ly/3umN2S9
► bit.ly/3aar7GW
► bit.ly/3y9kD2S
► bit.ly/3uhLskn
Python
********************************
► bit.ly/3agNgU0
► bit.ly/3NJNnoy
► bit.ly/2CTQ4mR
► bit.ly/3OIYWh1
Selenium With Python,Pytest&Behave
***************************************
► bit.ly/3OHHoC9
► bit.ly/3IeNLdv
► bit.ly/2J4tPeT
► bit.ly/3ydSkAq
Selenium With Python Using Robert Framework
(Web&API Testing)
*************************************************
► bit.ly/3nUvlpr
► bit.ly/3nUvE3z
API Testing (Postman,SoapUi,&Rest Assured)
**********************************************
► bit.ly/3OXacWY
► bit.ly/3yh0UhE
► bit.ly/3nC9DWQ
► bit.ly/3yGfhNS
► bit.ly/3OJa11H
► bit.ly/3P2slCC
Mobile App Testing Appium
****************************
► bit.ly/3Al49HG
Performance Testing Jmeter
*******************************
► bit.ly/3nz4fE7
Maven,Jenkins,Git,Github,CI/CD
*******************************
► bit.ly/3P16HPj
► bit.ly/3yhlUVA
► bit.ly/3afYfwT
► bit.ly/3yGzweG
► bit.ly/3yF73Ws
► bit.ly/3NCOmH7
SQL,DB Testing&ETL,Bigdata
*******************************
► bit.ly/3NKOcNY
► bit.ly/3OVpDyI
► bit.ly/3NEvUy0
► bit.ly/3IryxlT
► bit.ly/3RkWBLh
JavaScript Based Automation Tools
********************************
► bit.ly/3nUx51X
► bit.ly/3AqI6Q0
► bit.ly/3yeurbT
► bit.ly/3ujzpTK
Selector Hub Tools
********************
►rb.gy/h3h424
GraphQL
******************
► rb.gy/sj3gys
Cypress API Testing
********************
► shorturl.at/fjKPX
Cypress Web Testing
**********************
► shorturl.at/agjlK
Playwright with Javascipt
**************************
► shorturl.at/adSTY
#PythonSorting
#ArraySorting
#SortElements
#AlgorithmsInPython
#CodeSorting
#PythonArrays
#ArrayManipulation
#SortAlgorithm
#CodingInPython
#DataStructures
#PythonProgramming
#ArrayOperations
#AlgorithmTips
#SortingTips
#TechProgramming
#PythonTips
#CodeOptimization
#ProgrammingSkills
#ArrayManagement
#SortLogic
#PythonDevelopers
#AlgorithmDesign
#CodingCommunity
#PythonLearning
#ArrayTricks
#SortFunctions
#ProgrammingHelp
#PythonArrays101
#CodingJourney
#SortChallenges
#ProgrammingLanguages
#PythonSnippets
#ArrayPuzzles
#SortVisualizations
#CodeDebugging
#PythonTipsAndTricks
#AlgorithmMastery
#CodingSolutions
#PythonTricks
#ArrayProblems
#SortTechniques
#CodeMentorship
#PythonCommunity
#AlgorithmExplained
#CodingInspiration
#ArrayExamples
#SortWalkthrough
#CodeExploration
#PythonExperts
#AlgorithmDiscussion
Excellent! no one explained the bubble sort so easily !
Thanks
@@sdetpavan
Can you please make more dsa videos
This video is so easy to understand, I have watched once & run the program…Thanks!
hii sir please can you tell why this looping is not working for list array
sir, what if we avoid sorted element in inner forLoop ?
Can you do same for insertion and selection sort also..It will be helpful sir
Excellent! way of explanation! Thanks!
You're welcome!
Thank you so much sir, sir please make video on quick sort , selection sort,
Sir u told that, if u give i=1 than i
Hi, can you please add video showing how to merge two arrays
you are a great teacher please keep it up.....best luck.
Thanks
Thanks for this easy explanation....I am glad... 😀
You are welcome
sir i have got a index out of bond exception
Thank You very much Sir.
Welcome
It helpful soo much... Thanx sir
Welcome
There can be an optimisation to this - What if all the elements of the array are aldready sorted? In this case still the current algorithm will run for O(N^2) which we dont need. Instead, we can have a boolean check inside the swap method. If there is no time the boolean gets flipped, we are sure that the array is aldready sorted.
jo mil rha lelo gyan mat do smjhe
Sir in j loop we should run it from 0 to n-i-1 because after every pass 1 element is getting sorted at the end and which is stored in i thats why.
True, but no change in output speed of execution increases
Thanks so much sir!
Welcome
Thank you sir🤝
Welcome
What is the process for sorting strings in an array.?
Dim array1()
xp = "HEADC"
strlen = len(xp)
For Iterator = 1 To strlen
a = mid(xp,Iterator,1)
ReDim preserve array1(Iterator)
array1(Iterator) = a
Next
p=1
num = array1
leng = Ubound(num)
for i = 1 to leng
for j = 1 to leng
if num(i) < num(j) then
temp = num(i)
num(i) = num(j)
num(j) = temp
end if
next
next
mp = num2
For i = 1 to leng
str = str & num(i)
next
msgbox str
“Earth rotates on its axis as it revolves around the Sun.”
Earth -> Loop
Sun -> Array
rotates on its axis -> inner loop (j loop)
revolves around the Sun -> outer loop (i loop)
very helpfull and good teaching sir!!!! u will sure hit 1m subscribers soon and u desrve it
Thanks
Commenting for better reach
super superb superb 😇😇😇😇😇😇😇😇😇😇😇😇😇😇😇😇😇😇
Thank u sir ☺️☺️
Welcome
Super teacher
Thank you! 😃
Sir I want this program dynamically
Do you want to read the elements dynamically, if so, below is the code for that:
Scanner s = new Scanner(System.in);
System.out.print("Enter number of elements:");
int n = s.nextInt();
int a[] = new int[n];
for(int i=0; i