Linked List Introduction

Linked List:

Linked List is a data structure used for sorting collection of a data and has the following properties:
§  Successive elements are not connected by pointers
§  Can grow or shrink size during execution of the program
§  It does not waste memory
§  1st node is considered as head
§  Last node is considered as the tail
Main Linked List operations:
Insert:  Inserts elements in the list.
Delete: Delete an element from the list.

Why Linked List??
There are so many data structures which can do the same thing. The important thing is understanding the difference between linked list and arrays. Both linked list and arrays are used to store collection data.
Arrays have a constant access time by using index and size is fixed.
Liked list access time is more but can be growable or resizable.
Linked List types:
A.   Singly Linked List
B.   Doubly Linked List
C.   Circular Linked List

A.   Singly Linked List: Generally linked list means singly linked list. It has a number of node a pointer to next node.

B.   Doubly Linked List: It is also called as two way linked list. It is called so because it can navigate in both the directions.

C.   Circular Linked List: Single and Doubly linked list have ends but circular linked list does not have ends. While traversing a circular linked list we have to careful otherwise we will traverse infinitely.








Strings Introduction



String are most widely used in any programming language. String is basically sequence of characters and. in Java Strings are treated as objects.

string implements serializable, comparable, charsequence


There are 2 ways you can declare String in Java:

Arrays Introduction

Image result for array









As per Wiki "In computer science, an array data structure, or simply an array, is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key. An array is stored so that the position of each element can be computed from its index tuple by a mathematical formula.The simplest type of data structure is a linear array, also called one-dimensional array."


As per above image, the elements starting from 0-9 are called indices and elements are represented below each index.

Applications: