Posts

Showing posts with the label Data Structure

Applications of a Queue in Daily life

Image
Definition of Queue A Queue is "an abstract data type in which elements are added to the rear and removed from the front; a 'first in, first out' (FIFO) structure."  ( C++ Plus Data Structures , page 226) The main difference between a queue and a stack is that elements in a queue are put on the bottom and taken off the top (remember, in a stack, elements put on the top and taken off the top). For an everyday queue example, consider a line of customers at a bank waiting to be served. Each new customer gets in line at the rear. When the teller is ready to help a new customer, the customer at the front of the line is served. This is a queue--the first customer in line is the first one served. 1.1 Applications of a Queue In general, queues are often used as "waiting lines". Here are a few examples of where queues would be used: In operating systems, for controlling access to shared system resources such as printers, files, communication lines, disks and tapes.A ...

Course E-Books Semester Wise

E-Books:     1st Semester    2nd Semester      3rd Semester

Data Structure Programs

Image
"All Data Structure Programs up-till now"  To get code click on that program heading :) How to add two matrix size is define by use Recursion in c programming Insertion and Deletion in array at any Point size define by user C++ program to find Fibonacci sequence of any number Program to print your name 10 time using Recursion Program to print counting 1 t0 10 using Recursion Program to find Factorial of any number given by user Program to print counting 10 to 1 using Recursion ----------------------------------------------------------------

Recursion

Image
Recursion is the process a procedure goes through when one of the steps of the procedure involves invoking the procedure itself. A procedure that goes through recursion is said to be 'recursive'. To understand recursion, one must recognize the distinction between a procedure and the running of a procedure. A procedure is a set of steps based on a set of rules. The running of a procedure involves actually following the rules and performing the steps. An analogy: a procedure is like a written recipe; running a procedure is like actually preparing the meal. Recursion is related to, but not the same as, a reference within the specification of a procedure to the execution of some other procedure. For instance, a recipe might refer to cooking vegetables, which is another procedure that in turn requires heating water, and so forth. However, a recursive procedure is where (at least) one of its steps calls for a new instance of the very same procedure, like a sourdough recipe calling f...

Abstract data types

What is an abstract data type? An abstract data type ( ADT ) is an object with a generic description independent of implementation details. This description includes a specification of the components from which the object is made and also the behavioral details of the object. Instances of abstract objects include mathematical objects (like numbers, polynomials, integrals, vectors), physical objects (like pulleys, floating bodies, missiles), animate objects (dogs, Pterodactyls, Indians) and objects (like poverty, honesty, inflation) that are abstract even in the natural language sense. You do not see C in Pterodactyls. Only when you want to simulate a flying Pterodactyl, you would think of using a graphics package in tandem with a computer language. Similarly, inflation is an abstract concept. When you want to model it and want to predict it for the next 10 years, you would think of writing an extrapolation program in C. Specifying only the components of an object does not suffice. Depe...

3rd Semester E-Books

Image
To download any book just click on download button and pdf file is open in new tab.. right click on it and save as pdf. :)   Data Structures and Algorithms in C++  [ Second Edition ]  by  Michael T. Goodrich -------------------------------------------------------------------------------    Fundamental of Database System  [ 5th edition ]  [solution]  by elmasri and navathe -------------------------------------------------------------------------------    Fundamental of Database System  [ 3rd edition ]   by elmasri and navathe -------------------------------------------------------------------------------     Fundamental of Database System  [ 6th edition ]   by elmasri and navathe ------------------------------------------------------------------------------- Fundamental of Database System   [ 4th edition ]   by elmasri and navathe ------------------------------------------------------...