Blog

Introduction

Control Statements Control statements in Java are set of instructions which manage the flow of execution of a program based on certain conditions which are used to make decisions, iterate(looping) through blocks of code multiple times, and to jump to a different part of the code based on certain conditions. The three types of control

Introduction Read More »

Jump

Jump Statements Jump statements are control statements that transfer execution control from one point to another point in the program,allowing for changes in the flow of execution. There are three Jump statements that are provided in the Java programming language: 1) Break Statement2) Continue Statement3) Return Statement 1) Break Statement :A break statement in Java

Jump Read More »

Decision Making

Decision Making Statements Decision-making statements are one of the control flow statements which decide which statement to execute and when. It evaluate the boolean condition and control the execution of the block still the boolean condition provided is true.There are two types of decision-making statements in Java 1) if statement2) switch statement 1) if Statement:

Decision Making Read More »

Loops

Loops in JavaLoop in programming concept is block of code which provides a set of instruction that keeps executing until a specific condition is met and becomes true/false to stop its execution,whether execution needs to be stopped on true or false depends on the condition that is implemented to stop its execution. In Java there

Loops Read More »

Heap Sort

Heap Sort in Java Heap sort is a comparison-based sorting technique which is based on Binary Heap Data Structure. Heap Sort is an optimization of selection sort where we first find the max (or min) element swapping it with the last (or first). and we repeat the same process for the remaining elements. In Heap

Heap Sort Read More »

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 »

Scroll to Top