Posts

Write a menu driven program to perform insert and delete operations in a circular linked list

#include #include #include #include #include int insbeg(int item); int inspos(int item); int insend(int item); int length(); int delbeg(); int delpos(); int delend(); struct node {             int info;             struct node *link; }; typedef struct node n1; n1 *last = NULL; n1 *currptr, *newnode, *preptr;

Write a program to add two polynomials using a linked list

#include #include #include struct poly_node {             int coeff, expo;             struct poly_node *link; }; typedef struct poly_node poly; poly *insert_polynode(int, int, poly*);

Depth first search (DFS)

This is a very simple type of brute force searching techniques. The search begins by expanding the initial node i.e. by using an operator generate all successors of the initial node and test them. This procedure finds whether the goal can be reached or not but the path it has to follow has not been mentioned. Diving downward into a tree as quickly as possible performs DFS searches. Algorithm:

Breadth First Search (BFS)

This is also a brute force search procedure like DFS. We are searching progresses level by level. Unlike DFS which goes deep into the tree. An operator employed to generate all possible children of a node. BFS being a brute force search generates all the nodes for identifying the goal. ALGORITHM:

Write a short note on Best first search ?

Best-first search, rather than plunging as deep as possible into the tree (as in   depth-first search ), or traversing each level of the tree in succession (as in   breadth-first search ), uses a heuristic to decide at each stage which is the best place to continue the search. Best-first search in its most basic form consists of the following algorithm (adapted from   Pearl, 1984): The first step is to define the OPEN list with a single node, the starting node. The second step is to check whether or not OPEN is empty. If it is empty, then the algorithm returns failure and exits. The third step is to remove the node with the best score, n, from OPEN and place it in CLOSED. The fourth step “expands” the node n, where expansion is the identification of successor nodes of n. The fifth step then checks each of the successor nodes to see whether of not one of them is the goal node. If any successor is the goal node, the algorithm returns success and the solution, which c...
Hiiiii to all........pls frnds....before download the content from this blog...plss join this site and like my facebook page also ......  http://www.facebook.com/Prasenrajblog.......thanks to all......

Difference between TCP and UDP

TCP UDP Reliability : TCP is connection-oriented protocol. When a file or message send it will get delivered unless connections fails. If connection lost, the server will request the lost part. There is no corruption while transferring a message. Reliability : UDP is connectionless protocol. When you a send a data or message, you don't know if it'll get there, it could get lost on the way. There may be corruption while transferring a message. Ordered : If you send two messages along a connection, one after the other, you know the first message will get there first. You don't have to worry about data arriving in the wrong order. Ordered : If you send two messages out, you don't know what order they'll arrive in i.e. no ordered Heavyweight : - when the low level parts of the TCP "stream" arrive in the wrong order, resend requests have to be sent, and all the out of sequen...