Language Elements

Object Oriented Concepts

Data Types

Key Words

Arrays

Pointers

Data Structures

Multithreading

Errors and Exception Handling

Interview Questions



Contact



Data Structures

Data Structure is group of elements, which may have different types and lengths, but categorized under one name. It helps storing, organizing and efficient retrieving of data. Data Structure can be already built into the language, and also can be of kind implemented using the built in data structures and data types. Built in data structures include Arrays, Structures, Unions and Classes. Complex data structures implemented using built in data structure and data types include Stack, Queue, List, Linked List, Tree and Graph.

Arrays

Array is one of the very basic data structure with values stored at consecutive memory locations. An array is static data structure, with homogenous elements (of the same type)

List

A list is dynamic data structure of ordered sequence of the same data type. Unlike Stacks and Queues, List allows arbitrary and frequent modifications of any of the sequence.

Maps

The data is stored in pairs. It provide a mapping between a primary key value and other non key value. For each one value there is only one second value. Map items are stored in key order using arbitrary key type with arbitrary ordering, an advantage over array and vector.

Stacks

Stacks are common and simpler to use Data Structures. Adding, removing and deleting of data is permitted only from the top. Data and addresses are pushed known as Pushing or deleted to the stack known as Popping.

Queues

A Queue is similar to a stack, though it is relatively harder to write. Addition of data is done in the BACK end and deletion in the FRONT end.

Binary Trees

Binary Trees is a non-linear data structure (no definite order of placement). It is made of nodes with a left and right pointer, recursively pointing to the smaller subtrees on either side. The root pointer points to the topmost node in the tree. For deleting a node, it is replaced with teh bext successive in order.

Sets

A set is collection of objects of same type e.g a set of integers or set of characters. There are three basic operations in sets i.e. testing of membership, inserion of item and removal of item.

Linked List

Linked list is a type of data structure that can be used to assign dynamic memory location. The valus are stored as nodes and connected by pointers. It is dynamic data structure, where values can be modified at run time, unlike arrays (static data structure). Values in Linked List are stored at random memory locations, and connected by pointers. It is preferred when one don't know how much memory space is required.

Circular Linked List

The memebers of the last node point to the first node instead of NULL. The main advantage is that head pointer can be pointed to any node without destroying the list.

Double Linked List

Consisit of nodes with two lined members. One points to the previous node in the list, and the other to the next. It can minimize the need for traversals.

Binary Search Tree

Binary Trees is a non-linear data structure (i.e. no definite order of placement) Main node known as the Root with two sub-sections, i.e. the left and the right half. Every node can be thought of a binary tree itself with two pointers, one to the left and the other to the right.It is placed after a node's right pointer if the value of the node is lesser than the one to be added and otherwise the node's left pointer. Binary tree is recursive (each node can be thought of a binary tree itself). For deleting a node, it is replaced with it's next inorder successor.





Copyright © by Zafar Yasin. All rights reserved.