Tuesday, February 25, 2020

Tuesday, 25 Febuary 2020

1) Pointer is a data type whose value refers to another value stored
elsewhere in computer memory using its address.

Two most important operators used with pointer type:
a) & the address operator
b) * the dereferencing operator

Example in declaring pointer :
data type *ptr name;
eg: int *pointer;
    char *pointer;

2) Array is a collection of similar data elements, these data
have the same data type (homogenous).

Array's element are stored in consecutive memory locations
and are referenced by an index.

Array index starts from zero.

3) Structure is a user-defined data type that can store related information
(even of different data types) together, while an array can store only
entities of same data types.

It is a collection of variables under a single name.

The variables within a structure are of different data types and each has a name that
is used to select it from the structure.

4) A data structure is an arrangement of data either in the computer's memory or on the
disk storage.

Some common examples of data structures are :
- Arrays
- Linked Lists
- Queues
- Stacks
- Binary Trees
- Hash Tables

5) Linked list are collection of nodes which doesnt store its node in a consecutive
memory locations and can be accessed only in an sequential manner.

Single linked list are a type of linked list that goes in a direction (only one direction) so it will only move forward and cant go back to the previous data. Only can refer to next data.

Singly-linked-list.svg





  • Example of Single linked list ^^ 


Double linked list are type of linked list that can goes forward and backward so it can goes to two direction , next and previous data.

Doubly-linked-list.svg



  • Example of Double linked list ^^


Circular linked list is when the head can refer to the tail and the tail can also refer to the head, this creates a loop. In this linked list. A Circular linked list does not contain NULL because the head and the tail can refer to each other.

Circularly-linked-list.svg






Tuesday, 10 March 2020

Hashing -Hashing is a method / technique used for storing and retrieving keys in a rapid manner. -Hashing is also used to index and ret...