Posts

Showing posts from October, 2012

DATA STRUCTURES INTERVIEW QUESTIONS

LINKED LIST INTERVIEW QUESTIONS Here Is One Of Most Asked Interview Question On Linked List !   We Have Given A List With Following Data :- 1->2->3->4->5->6->7->8->9->10 and k=3 Then Output Should Be :- 4->3->2->1->5->6->7->8->9->10 ------------------------------------------------------------------------------------------------------------------ Here Is A Solution To This Problem:- ------------------------------------------------------------------------------------------------------------------ #include<stdio.h> #include<conio.h> #include<stdlib.h> typedef struct ll { int data; struct ll *next; }mynode; mynode *start; void placestart(mynode **hd,int c); int numofnodes(mynode *hd); void addnode(mynode **hd,int data); void revinstyle(mynode **hd,int nonr); void printall(mynode *hd); void main() { int ch,data,nonr,count; mynode *head=NULL; clrscr(); do { printf("\n1.Add Data"); printf("\n2.Eno...