C Programming C++

Searching techniques

Searching Techniques Files and Records: A record is a collection of related information and Collection of records is called a file. Ordered and unordered ———————————– Unordered– There is no relation between the records Ordered –The keys are ordered in a specific fashion to enhance searching. Keys: Specific field in a record to differentiate each record […]

C Programming C++

Sorting technique

Sorting Techniques Sorting is a process to arrange the records in the file in an order(either ascending or descending) with respect to the key. Sorting can be divided into two types of categories called internal and external sorting based on location of records at the time of sorting. The characteristics of sorting methods are – […]

C Programming C++

Data structure Graph

Introduction to Graphs The limitation of tree is that it cannot represent many to many relation. This limitation is overcome by using Graph. Definition of a Graph ——————————- Graphs is a data structure consisting of a set of vertices (or nodes) A set of edges (or links) connecting the vertices G = (V, E) where V […]

C Programming C++

Data structure – Advanced Trees

Advanced Trees ———————— Definition of an AVL tree: An AVL tree is a binary search tree which has the following properties: 1. The sub-trees of every node differ in height by at most one. 2. Every sub-tree is an AVL tree. Named after their inventors, Adelson-Velskii and Landis, they were the first dynamically balanced trees […]

C Programming C++

Trees – Data Structure

Introduction to Trees [Data Structure] ——————————————————- A tree  is a finite set of one or more nodes There is a specially designated node called the root  Remaining nodes are partitioned into n>=0 disjoint sets T1,…..Tn, where each of these sets is a tree. The sets T1,…. Tn are called subtrees of the root.   Terminologies […]

C Programming C++

List-Stack-Queues

Data Structure : Linked List, Stack and queues Creating and Managing Linked Lists ————————————————– List generally refers to a sequential organization of items like an array. Array allocates memory of size, which we determine in the beginning itself. Later this can be used for storing values. A linked list is a chain of structures in […]

C Programming C++

Data structure and algorithm

Data Structures A data structure is a logical method of representing data in memory. Data structure is strictly described as an instance of an Abstract Data Type (ADT). An Abstract Data Type is defined as a mathematical model of a user-defined type along with the operations performed on that model. Data Structure Strengths Weaknesses Array […]

C++

CPP Basic Programs-List1

Following are the list of C++ Programs. 1. C++ Program to display employee salary information. #include<iostream.h> #include<conio.h> class test { public: int bs, hra, pf, net; getdata(int bs1, int hra1, int pf1) { bs=bs1; hra=hra1; pf=pf1; net=bs+hra-pf; return(net); } void display() { cout <<“Net Salary=”<<net; } }; main() { clrscr(); test t; t.getdata(10000,3000, 1500); t.display(); […]