Docsity

Java Programming Practical Session: DSA Prac 1, Slides of Data Structures and Algorithms

Partial preview of the text

Download Java Programming Practical Session: DSA Prac 1 and more Slides Data Structures and Algorithms in PDF only on Docsity!

  • DSA -­‐ Prac*cal
    • 19/11/

Things You Need

§ IDE

§ Eclipse

§ Netbeans

§ IntelliJ

§ Running Java

§ Command-­‐line: java –version

java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Remind you of something ?

Now, the bubble sort!!

true

-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 0 | 16 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 1 | 17 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 2 | 14 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 3 | 14 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 4 | 14 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 5 | 16 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 6 | 12 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 7 | 15 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 8 | 18 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 0 | 16 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 1 | 17 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 2 | 14 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 3 | 14 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 4 | 14 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 5 | 16 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 6 | 12 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 7 | 15 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 8 | 18 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ | 9 | 55 | -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐