-
Selection Sort
Selection Sort in Java Selection Sort is a comparison-based sorting algorithm that sorts an array by repeatedly finding the minimum element (considering ascending order) from the unsorted part and putting it at the beginning. The process is continued until the entire array is sorted. Algorithm for Selection Sort Step 1 : Set the first element…
-
Insertion Sort
Insertion Sort in JavaInsertion sort is a sorting algorithm that places an unsorted element in a sorted list in each iteration.Insertion sort works similar to sorting cards in our hand in a card game in which we place the first card which is already sorted then, we select an unsorted card. If the unsorted card…
-
Bubble Sort
Bubble Sort in Java Bubble sort is a sorting algorithm that compares two adjacent elements and swaps them if they are in the wrong order that’s expected. Bubble sort algorithm is not suitable for large data sets as its average and worst-case time complexity are quite high. Algorithm for Bubble Sort in Java 1) Start…
-
Binary Search
Binary Search in Java Binary search is a searching techniques which is used when the array is sorted. In Binary Search the middle element that acts as a reference key which is used to decide whether to go left or right of the sorting list. This searching helps in optimizing the search technique with every…
-
Linear Search
Linear Search in Java Linear search is a sequential searching algorithm in which we need to start from first element and check every element of the list until the desired key element is found. Since Linear search is slower than binary search and hashing it is less used nowadays. Linear Search Algorithm Syntax : Steps…
-
Odd Even Number
Odd Even Number Java Program To Check Whether a Number is Odd or Even To check if a number is even or odd,the number is divided by 2 and is checked if it’s divisible or not. If number is divisible by 2 it’s even else it’s odd. Three are three ways to check whether a…
accessmodifier (1) android (2) android architecture (1) armstrong (1) armstrongnumber (1) binarysearch (1) binding (1) bubblesort (1) bubblesortoptimized (1) camelcase (1) default (1) evenoddnumber (1) factorial (1) factorialnumber (1) factorialofnumber (1) fibonacci (1) fibonacciseries (1) final (1) final keyword (1) garbage (1) garbage collector (1) inheritance (1) insertionsort (1) instanceof (1) iteration (1) iterative (1) java (23) java access modifier (1) javabinarysearch (1) java binding (1) javabubblesort (1) javabubblesortoptimized (1) javacamelcase (1) Java Encapsulation (1) javaevenodd (1) java final (1) java garbage (1) java garbage collector (1) java inheritance (1) javainsertionsort (1) javainstanceof (1) java keyword (4) javakeyword (2) javakeywords (2) javalinearsearch (1) javamethod (1) java multithreading (1) javanamingconvention (1) javaoddeven (1) java oops (2) java polymorphism (1) javaprogram (12) javaprogramming (7) javareservedword (1) javareservedwords (1) javasearching (2) javaselectionsort (1) javasorting (3) java static (1) java this (1) java threading (1) kernel (1) keyword (5) linearsearch (1) loop (2) matrices (1) matrix (1) matrixaddition (1) matrixmultiplication (1) matrixprogram (1) matrixsubstraction (1) method (1) multithreading (1) nameconvention (1) namingconvention (1) oddevennumber (1) oops (2) palindrome (1) palindromenumber (1) palindromestring (1) polymorphism (1) primenumber (1) private (1) protected (1) public (1) recursion (2) reservedword (1) searching (2) selectionsort (1) sorting (3) static (1) static keyword (1) ternary (1) ternaryoperator (1) this (1) this keyword (1) threading (1)