Java

Java is an Object Oriented as well as Platform Independent programming language. JAVA FEATURES Compiled and Interpreter Platform independent Object Oriented Secure Distributed Simple JAVA  Architecture Step-1: Create a java source code with .java extension Step-2: Compile the source code using java compiler, which will create bytecode file with .class…

what is Python

What is Python?

Python was created by Guido van Rossum at Stichting Mathematisch Cen-trum in the Netherlands in the early 1980s. There are various programming languages available such as C, C++, Java and C#. But unlike all these programming languages Python is very simple with more powerful syntax. Python is used by various…

Tuples in Python

Tuples are used to store multiple items in a single variable. Tuples are the collection of items. It is immutable. Tuples are written with round brackets. Accessing the elements of tuple Tuples are immutable You cannot change the elements in tuple. Finding number of items in a tuple We can…

Quicksort in Python

Quicksort is an algorithm based on divide and conquer approach in which the array is split into subarrays and these sub-arrays are recursively called to sort the elements. How Quicksort Works? Step1: A pivot element is chosen from the array. You can choose any element from the array as the…

Insertion Sort in Python

This is an in-place comparison-based sorting algorithm. Here, a sub-list is maintained which is always sorted. For example, the lower part of an array is maintained to be sorted. An element which is to be ‘insert’ed in this sorted sub-list, has to find its appropriate place and then it has…

Selection Sort in Python

Selection sort is a simple sorting algorithm. This sorting algorithm is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. Initially, the sorted part is empty and the unsorted part is…

List in Python

Lists are used to store multiple items in a single variable. A list is created by placing all the items (elements) inside square brackets¬†[], separated by commas. It can have any number of items and they may be of different types (integer, float, string etc.). Examples of Lists There are…

Binary Search

Binary search is the search technique which works efficiently on the sorted lists. Hence, in order to search an element into some list by using binary search technique, we must ensure that the list is sorted. Binary search follows divide and conquer approach in which, the list is divided into…

Linear Search

In computer science, a linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until a match is found or the whole list has been searched. Concept of Linear Search Let’s understand the following steps to find the element key = 7 in…

Bubble Sort

Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order. The pass through the list is repeated until the list is sorted. How Bubble Sort Works? Starting from the first index, compare the first and the second elements.If the…