Friday, December 28, 2007

Write a C program which produces its own source code as its output

Write a program to merge two arrays in sorted order, so that if an integer is in both the arrays, it gets added into the final array only once.

Write a program to print a square matrix helically.

Write a program generate permutations.

Write a program for sample generation

Write a C program generate combinations

Write a C program to solve the 8 queens problem

Write pseudocode to compare versions (like 115.10.1 vs 115.11.5).

Write C code to check if an integer is a power of 2 or not in a single line?

Write code to add two polynomials

Wite code to evaluate a polynomial.

Write a program to add two long positive numbers (each represented by linked lists)

Write a program to check if the stack grows up or down

Write a C program to check for palindromes

Write a C program to multiply two matrices.

Write C code to dynamically allocate one, two and three dimensional arrays

Write code to remove duplicates in a sorted array.

What are the elements of Object Oriented Design

Data Structure and Algorithm

Topics Available

obtain 24 from four 0's. This time you can use any valid mathematical operation.

obtain 24 using the numbers 1,3,4,6 once each and only the operations +,-,/,*

Why do we need inline function, when we do have macros ?

How to declare a pointer to a function?

A full N-ary tree has M non-leaf nodes, how many leaf nodes does it have?

Write a program to create a mirror copy of a binary tree (left nodes become right and right nodes become left)

Write code to check if a given binary tree is a binary search tree or not?

What is an AVL tree?

Find the closest ancestor of two nodes in a binary tree.

What is a threaded binary tree?

Given an expression binary tree, evaluate the expression and obtain a paranthesized form of the expression

How many different binary trees can be constructed using n nodes?

Construct a binary tree given its inorder and preorder traversal strings. Similarly construct a binary tree given its inorder and post order traversal

How do you convert a tree into an array

Can you construct a binary tree using postorder and preorder traversal?

Write a program to create a copy of a binary tree

Write code to implement level order traversal of a binary tree

Write code for iterative preorder, inorder and postorder tree traversals

Write code for recursive preorder, inorder and postorder tree traversals

Write a code to count the number of leaves in a binary tree

Write C code to search for a value in a binary search tree (BST)

Write a C program to compute the maximum depth in a tree?

Write C code to determine if two binary trees are identical

Write a C program to swap two variables without using a temporary variable

Write a program to generate all permuatation of a string

Write a program to generate all subsstring of a input string

Write a function to determine the number of elements (or size) in a tree

Write a C program to find the depth or height of a tree.

Write a code to split a string at equal intervals

How to generate prime numbers? How to generate the next prime after a given prime?

Write a program to check if a given year is a leap year or not?

Write a C progam to convert from decimal to any base (binary, hex, oct etc...)

Write a C program for calculating the factorial of a big number

Write a C program for calculating the factorial of a number

Write a C program to delete a node from a Binary Search Tree

Write C code to return a pointer to the nth node of an inorder traversal of a BST

Write a C program to find the mininum/maximum value in a binary search tree.

Write a C program to delete a binary tree

Write a C program to find the length of LCS ( longest common subsequence ) of two given strings

Write a C program which does wildcard pattern matching algorithm

Write a C program to reverse the words in a sentence in place

Implement the memmove() function. What is the difference between the memmove() and memcpy() function

Write your own copy() function

Write your own C program to implement the atoi() function Updated

Write C code to implement the strstr() (search for a substring) function

Write your own printf() function in C

Implement the substr() function in C

Implement the strcpy() function.

Implement the strcmp(str1, str2) function

Write C programs to implement the toupper() and the isupper() functions

Write a C program to implement your own strdup() function

Write a C program to implement the strlen() function

Write your own strcat() function

Write a C program to reverse a string

Thursday, December 27, 2007

How would you detect a loop in a linked list?

Write a C program to remove duplicates from a sorted linked list

How would you find out if one of the pointers in a linked list is corrupted or not?

Write a C program to return the nth node from the end of a linked list.

Write a C program to create a copy of a linked list.

Can we do a Binary search on a linked list?

How do you find the middle of a linked list?

How to create a copy of a linked list?

Write a C program to implement a Generic Linked List.

How do you sort a linked list?

How do you reverse a singly linked list? How do you reverse a doubly linked list?

How do you reverse a linked list without using any C pointers?

How can I search for data in a linked list?

How to compare two linked lists? Write a C program to compare two linked lists.

How to read a singly linked list backwards?

Write a C program to insert nodes into a linked list in a sorted fashion

Write a C program to free the nodes of a linked list

Given only a pointer to a node to be deleted in a singly linked list, how do you delete it?

What is collision and ways to avoid it

write BFS routine

Declare a array of strings

how to create a heap in O(n) time complexity

Insert a node recursively in a Binary search tree

Implement a queue using array

Implement a stack using array

How to declare array of pointer to a function returing pointer to an integer

How to declare a structure of a linked list

determine whether a machine's byte order is big-endian or little endian and convert from one to another

Write a C program to calculate pow(x,n)

program to find the GCD of two numbers