void ultima(long int a,long int b);
void main()
{
long int yr, lp_yrs=0, difference=0, total_days=0, weekday,i,c,finalday=0,check=0,date;
clrscr();
printf("Enter the year:");
scanf ("%ld", &yr);
if(yr%4==0 && yr%400!=0)
check=1;
else
check=0;
difference=(yr-1900-2);/*difference between entered year and reference year*/
for(i=1900;i=2000)
a++;
if [...]
Archive for the ‘C Tidbits’ Category
Program On Gregorian Calender
Posted in C Tidbits, Data Structures in C/C++
Balanced (AVL) Binary Search Trees
An AVL (adelson-velskii-landis) tree also known as balanced tree is a binary search tree with a balance condition.
The balance condition is that for every node in the tree, the height of left and right subtrees can differ by at most 1. The condition ensures that the depth of the tree is O(log N).
[...]
Continue Reading..
Posted in C Tidbits, Data Structures in C/C++
Binary Search Trees
A binary tree is a tree in which no node can have more than two children. The property that makes a binary tree into a binary search tree is that for every node, X, in the tree, the values of all the keys in its left subtree are smaller than the key value in X, [...]
Continue Reading..
Posted in Uncategorized