tag:blogger.com,1999:blog-75541676014770915172021-09-14T07:26:51.664-07:00TUTORIALTPOINT- Java Tutorial, C Tutorial, DBMS TutorialTutorialpoint, javatpoint, corejava tutorial, c tutorial, c++ turorial, c programs, java programs dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.comBlogger270125tag:blogger.com,1999:blog-7554167601477091517.post-48821484874153145382021-09-14T07:25:00.001-07:002021-09-14T07:25:49.689-07:00 DBMS Vendors and their products Some of the popular DBMS vendors and their corresponding products are given below Metadata: metadata is the data about the data but not the actual data.Data dictionary: data dictionary is file that contains metadataSchema: The overall design of a database.dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-30896765841295883262021-09-14T07:11:00.001-07:002021-09-14T07:11:26.520-07:00Classification of Database management system The database management system can be broadly classified into 1. Passive database management system The passive database management system are query driven. In passive database management system the users query the current state of database and retrieve the information currently available in the in the database.Example: Traditional DBMS2. Active database management systemActive database dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-46584812141177823892021-07-12T06:05:00.001-07:002021-07-12T06:05:05.363-07:00 Introduction to tree and tree terminologyTree: A tree is a data structure similar to a linked list list but instead of each node pointing simply to to the next node in a linear fashion, each node points to a number of nodes.Tree is a example of non-linear data structures. A tree structure is a way of representing the hierarchical nature of a structure in a graphical form.The graph theoretic definition of tree is " It is a finite set ofdodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-52594657220043006222021-06-28T21:06:00.002-07:002021-06-28T21:06:14.819-07:00 Different types of graphs in data structures A graph G consists of two sets:(i) A set V, Called the set of all vertices( or nodes)(ii) A str V, called the set of all edges. This set E is the set of all pairs of elements from V.1. Directed Graph: A digraph is also called a directed graph. It is a graph G, where each edge have a direction. In the above figure, graph G2 is a directed graph.2. Undirected graph: An undirected graph G is a graphdodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-34005575161544692302021-06-28T16:23:00.004-07:002021-06-28T21:09:04.011-07:00Introduction to graphs and graph terminology A graph is a data structure that is used to represent a relational data. For example, a set of terminals in a network or a roadmap of all cities in a country. Such complex relationships can be represented using a graph data structure. Mathematically, a graph can be defined as followsA graph G = (V, E) consists of two sets V and E. The elements of V are called the vertices and the elements of E dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-82436012090947771982021-06-20T06:32:00.002-07:002021-06-20T06:32:37.326-07:00 Graph Representation - Adjacency matrix and Linked List By Graph representation, we simply mean the technique which is to be used in order to store some graph into the computer's memory.There are two ways to store Graph into the computer's memory.1. Sequential Representation / Adjacency matrix representationIn sequential representation, we use adjacency matrix to store the mapping represented by vertices and edges. In adjacency matrix, the rows and dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-16316381238025398552021-06-14T21:42:00.005-07:002021-06-14T21:42:47.566-07:00 Graph traversal -Breadth First Search (BFS) Breadth First Search (BFS) algorithm traverses a graph in a breadth ward motion and uses a queue to remember to get the next vertex to start a search, when a dead end occurs in any iteration.It employs the following rules.Rule 1 − Visit the adjacent unvisited vertex. Mark it as visited. Display it. Insert it in a queue.Rule 2 − If no adjacent vertex is found, remove the first vertex from the dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-59500620614268198542021-06-14T21:35:00.002-07:002021-06-14T21:35:24.194-07:00Graph traversal -Depth First Search (DFS) DFS (Depth First Search)Depth First Search (DFS) algorithm traverses a graph in a depthward motion and uses a stack to remember to get the next vertex to start a search, when a dead end occurs in any iteration.We use the following steps to implement DFS traversal...Thumb Rule 1 − Visit the adjacent unvigite vertex. Mark it as visited. Display it. Push it in a stack.Thumb Rule 2 − If no adjacent dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-56448306100660601172021-06-13T17:02:00.006-07:002021-06-18T07:45:09.127-07:00 Spanning Tree and minimum spanning tree in graphs What is spanning Tree?A spanning tree is a subset of Graph G, which has all the vertices covered with minimum possible number of edges. Hence, a spanning tree does not have cycles and it cannot be disconnected.By this definition, we can draw a conclusion that every connected and undirected Graph G has at least one spanning tree. A disconnected graph does not have any spanning tree, as it cannot dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-33615453592273877832021-06-13T16:42:00.003-07:002021-06-13T16:42:53.765-07:00 Prim's algorithm for computing minimal spanning treePrim’s Algorithm is a famous greedy algorithm.It is used for finding the Minimum Spanning Tree (MST) of a given graph.To apply Prim’s algorithm, the given graph must be weighted, connected and undirected.Prim’s Algorithm Implementation- The implementation of Prim’s Algorithm is explained in the following steps- Step-01: Randomly choose any vertex.The vertex connecting to the edge having least dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-24463387455243728232021-06-12T22:58:00.001-07:002021-06-12T22:58:10.454-07:00 Kruskal's Algorithm for finding minimum spanning tree The implementation of Kruskal’s Algorithm is explained in the following steps-Step-01: Sort all the edges from low weight to high weight.Step-02:Take the edge with the lowest weight and use it to connect the vertices of graph.If adding an edge creates a cycle, then reject that edge and go for the next least weight edge.Step-03:Keep adding edges until all the vertices are connected and a Minimum dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-71098943183066523932021-06-12T22:38:00.004-07:002021-06-12T22:38:31.442-07:00Topological sorting in graphs with example Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v in the ordering. Topological Sorting for a graph is not possible if the graph is not a DAG.A simple algorithm to find a topological ordering is to find out any vertex with in-degree zero, that is, a vertex without any predecessor. We can then add dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-88933836881400883542021-06-12T21:33:00.004-07:002021-06-12T21:33:43.213-07:00 An introduction to searching and sorting techniues Sorting is an important concept that is extensively used in the fields of computer science. Sorting is nothing but arranging the elements in some logical order.For example, we want to obtain the telephone number of a person, if the telephone directory is not arranged in a alphabetical order, one has to search from the very first page to till the last page. If the directory is sorted, we can dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-65529331351035817352021-06-12T18:39:00.000-07:002021-06-12T18:39:06.707-07:00 Merge sorting with example and programMerge sort is a divide-and-conquer algorithm based on the idea of breaking down a list into several sub-lists until each sublist consists of a single element and merging those sub-lists in a manner that results into a sorted list. Sorting by merging is a recursive, divide-and-conquer strategy. In the base case, we have a sequence with exactly one element in it. Since such a sequence is already dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-34995939209605380482021-06-12T18:26:00.001-07:002021-06-12T18:26:22.010-07:00 Quick sort with example and program
Quick Sort is also based on the concept of Divide and Conquer, just like merge sort. Quick sort is a fast sorting algorithm used to sort a list of elements. Quick sort algorithm is invented by C. A. R. Hoare. Quicksort uses the divide-and-conquer strategy to sort the given list of elements. This means that the algorithm breaks down the problem into sub problems until they become simple enough dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-74117957851477451022021-06-10T21:30:00.003-07:002021-06-10T21:30:26.964-07:00 Enumerated data type or enum in C Enumeration or enum is a user defined data type in C. It is mainly used to assign names to integral constants. The names make a program easy to read and maintain.1. The keyword enum is used to define enumeration data types in C.
#include<stdio.h>
int main()
{
enum week day;
day=wed;
printf("%d",day);
return 0;
}
you can also assign your own constant valuesExample:enum grade{first=60, second=dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-50076660498887604092021-06-10T21:22:00.001-07:002021-06-10T21:22:09.784-07:00 Advantages of structure type over array type variable Both structures and arrays are use to store group of data. But there are lot of differences between structures and arrays in C/C++. Here are some of major differences between structure and array. An array is a collection of related elements of the same type, structure can have elements of different types.An array is a derived data type where as a structure is a program defined one.An array dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-36282561487224654352021-06-09T01:38:00.004-07:002021-06-10T21:13:52.048-07:00Structures and functions in C For structures to be fully useful, we must have a mechanism to pass them to function and return them, A structure may be passed to the functions in three different ways.Passing individual membersPassing entire structurePassing structure using address 1. Passing individual membersTo pass individual members of the structure to a function we must use the dot operator to refer the individual membersdodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-13181091866830728292021-06-09T01:04:00.000-07:002021-06-09T01:04:07.229-07:00 Arrays of structure in CIn a class, we don't have just one student but there may be more than one, to process such students information using structures you need to create structure variable as an array.In array of structures the structure variable is itself an array that is we can use this variable to store the similar type of data ( of type structure) to handle.Example: Write a C program to read the details of "N" dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-1291180374401932242021-06-08T19:12:00.002-07:002021-06-08T19:12:17.577-07:00 Self referential structures in CSelf referential structures are those structures that contains a reference to data of its same type that is in addition to other data. A Self referential structures contain a pointer to the data that is of the same type.Example:struct department{char name[20];struct department *d;}struct employee{int salary;struct employee *e;};These types of self referential structures are more useful when you dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-10671137616079224422021-06-08T19:05:00.003-07:002021-06-08T19:05:55.525-07:00 Nested structures or structures with structure in CA structure with in a structure means nesting of structure. Nesting structure is permitted in C. let us consider the following structure where a employee structure is defined with in department structure.Example:struct department {char name[20];struct emp{ int id;int salary;char address[30];}e;}d;The innermost member in a nested structure can be accessed asd.e.id;d.e.sal;d.e.address;We can also dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-7075026628726519492021-06-08T18:39:00.005-07:002021-06-08T18:55:24.399-07:00 Introduction to Structures in CA structure is a user defined data type which stores different types of data under single name. In C language a structure a structure can be created using "struct" keyword. It has the following syntax.Storage-class struct tag-name{structure members;};In the above syntax storage class and tag name are optional but the semicolon at the end of the syntax is compulsory.Example:struct employee{char dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-10282715280378970782021-06-06T18:03:00.003-07:002021-06-06T18:03:41.750-07:00Dynamic memory allocation in C using pointers The process of allocating memory to the variables during execution of the program or at run time is known as dynamic memory allocation.C language provides a mechanism of dynamically allocating memory that is actually required. We reserve space only at run time for the variable that are actually required.C provides four library functions to automatically allocate memory at the run time. All these dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-60449461027446190122021-06-06T17:21:00.005-07:002021-06-06T17:21:55.614-07:00 Advantages and disadvantages of pointers in CA pointer is a variable which holds the memory address of another variables. Pointers are more useful to handle complex data structures like liked list and trees.Advantages of pointers:Pointers are more efficient in handling arrays and data tables.Pointers permit references to functions and there by facilitating passing of function as arguments to other functions.The use of pointer array to dodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0tag:blogger.com,1999:blog-7554167601477091517.post-87386349288381536662021-06-06T17:05:00.005-07:002021-06-06T17:05:46.678-07:00 Passing an array to function using pointers - call by reference An array can be passed to a function using pointers. For this, a function that accepts an array can be declared asExample: void display(int *arr, int n);;In the above example, the function name is display and it accepts two arguments one is an array ( declared using pointer) and other is an integer variable which is used to pass index number of the array.When we pass the name of the array throughdodda venkatareddyhttp://www.blogger.com/profile/00089604532905760893noreply@blogger.com0