Computers

Stack

You must have seen a stack of books:

stack-of-books.gif

When you want to pick up a book from this stack, you have to pick up the book first which you had placed in the last. In other words, this can be said as "Last In First Out (LIFO)".

This is the principle of Stack data structure. It works on the principle of LIFO.

The data that is pushed at last on the stack is first to pop out. Hence, there are two operations on stack:

Doubly Linked List

Doubly linked list is an extension of singly linked list, which includes the a pointer to the previous node in addition to next node pointer in case of Singly linked list.

doublyll.jpg

Due to this design, following additional benefits are gained by Doubly linked lists:

  1. Returning to the back node becomes easier, as we already have a pointer to back node in the current node itself.

Graph Theory

A graph is a drawing or a diagram consisting of a collection of vertices together with edges joining certain pairs of these vertices. Mathematically, we can write a graph as:

G = [V(G), E(G)]

where V(G) = Vertex set of graph G
E(G) = Edge set of graph G

Some definitions:

Parellel Edges: If two (or more) edges of a graph G have the same end vertices then these edges are called Parellel.

Isolated Vertex: A vertex of graph G, which is not the end of any edge is called Isolated.

Zeller Algorithm

Zeller devised an algorithm to predict the day of week for any date between year 1582 and 4902. This is a very popular algorithm. The algorithm has been given below:


int zeller(int dd,int mm,int yy)
{
int i;
int zm,zy;
if(mm<3)
zm=mm+10;
else
zm=mm-2;
if(zm>10)
zy=yy-1;
else
zy=yy;
i=((((13*zm-1)/5)+dd+zy%100+((zy%100)/4)-2*(zy/100)+(zy/400)+77)%7);
return i;
}

You can download the full C language source code for this site from the attachment.

My Linux Experiences

This Section refers to my linux experiences.

Singly Linked List

Singly linked list is a data structure, used to store data non-contiguously.

In a Singly linked list, data is stored into the non-contiguous nodes. Each node contains a reference pointer to the next node holding address of next node. Last node contains a null pointer in the next address field. It is a way of saying that "I am the last node".

sll.jpg

The main advantages of singly linked list are:

Data Structures

Data structures


Data structures are very important and interesting part of computer science.
Data structures are various methods by which a linked type of data can be stored
and retrieved in an efficient manner. Following are the main objectives of
having a separate data structure:

1) Least amount of memory redundancy.

2) Maximum amount of memory utilization.

3) Maximum efficiency of traversal.

Computers

This section contains topics on computers.

Technology

This section contains various technology related topics.

Array

Array
Array is a data structure used in almost all of the languages from second
generation onward. This data structure is used to store related data in
contiguous memory locations. The greatest advantage of array is it's simplicity.
Data is stored in contiguous locations and thus can be easily accessed by simple
mathematical calculation.

Array Operations
1) Initialize: In this operation, first element is stored in the
array. Here is a C function for initializing the array:

Syndicate content
Copyright Satya Services - 2008