2024

Merge Sort

Merge Sort in Java The merge sort is a divide and conquer algorithm that divides the input array into equal subarrays and then merges back those subarrays into a sorted array. The process of merge sort is to divide the array into two equal subarrays, sort each subarray, and then merge the sorted subarrays back […]

Merge Sort Read More »

Quick Sort

Quick Sort in Java Quicksort algorithm is based on the divide and conquer approach where an array is divided into subarrays by selecting a pivot element.The pivot element is positioned in such a way that elements less than pivot are kept on the left side and elements greater than pivot are on the right side.The

Quick Sort Read More »

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 as

Selection Sort Read More »

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

Insertion Sort Read More »

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

Bubble Sort Read More »

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

Binary Search Read More »

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

Linear Search Read More »

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

Odd Even Number Read More »

Ksamyatam Softwares Is An Independent Software Development Platform

Ksamyatam Softwares Is An Independent Platform Managed Solely By Its Founder,Sachin Ramdas Suryavanshi And It Is Not Interested In Any Kind Of Partnership Outside Of Google Admob’s Network It is to make it crystal clear that Ksamyatam Softwares is an independent software development platform founded,owned and managed solely by its founder, Sachin Ramdas Suryavanshi, is

Ksamyatam Softwares Is An Independent Software Development Platform Read More »

Java instanceof

Java instanceof In Java, instanceof is a keyword used for checking if a reference variable contains a given type of object reference or not(class or subclass or interface).It is known as a comparison operator where the instance is getting compared to type returning boolean true or false as in Java we do not have 0 and 1

Java instanceof Read More »

Scroll to Top