Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Bubble Sort

cwatson
cwatson 


I think i got it started the bidirectional bubble sort but somewhere i think i am lost since i am modify it and the second part is insertion sort and generic i dont really understand this part or how to began it Attachments Tags Clarifications

Answers

Bubble Sort

tt95588n
tt95588n 



Code attached Attachments
BubbleSort.java (1 K) Download Preview
static void bubbleSort(int[] intArray) { int n = intArray.length; int temp = 0; for(int i=0; i < n; i++){ for(int j=1; j < (n-i); j++){

Sort.java (1 K) Download Preview
array [i]; array [i] = tempVar; } } } for (int i = 0; i < array.length; i++) {

Screenshots
Purchase Answer

Biderectionalbubblesort

felo
felo 



code Attachments
biderectionalbubblesort.rar (2 K) Download




Preview
{ int T = array[j]; array[j] = array[j + 1]; array[j + 1] = T; } } for (j = n; --j >= st;) { if (array[j] > array[j + 1]) { int T = array[j]; array[j] = array[j + 1];

genericarray.rar (2 K) Download




Preview
list1.add(2); list1.add(2); list1.add(2); list1.add(3); list1.add(3); list1.add(3); System.out.println("Original List with Duplicates: \n" + list1); System.out.println(); list2 = removeDuplicates(list1); System.out.println("After removing duplicates: \n" + list2);

Screenshots
Purchase Answer

Mr.

felo
felo 



1 Attachments
Screenshots
Purchase Answer