What are BFS and DFS for Binary Tree? A Tree is typically traversed in two ways: Breadth First Traversal (Or Level Order Traversal) Depth First Traversals Inord
Breadth First Traversal (or Search) for a graph is similar to Breadth First Traversal of a tree (See method 2 of this post). The only catch here is, unlike tree
Given a tree represented as undirected graph. Count the number of nodes at given level l. It may be assumed that vertex 0 is root of the tree. Examples: Input :
BFS(Breadth First Search) is a graph traversal technique where a node and its neighbors are visited first and then the neighbors of neighbors. In simple terms i
Breadth-first search traversal of a graph using the algorithm given in CLRS book. BFS is one of the ways to traverse a graph. It is named so because it expands
A STL based simple implementation of BFS using queue and vector in STL. The adjacency list is represented using vectors of vector. In BFS, we start with a node.
Given a graph where every edge has weight as either 0 or 1. A source vertex is also given in the graph. Find the shortest path from source vertex to every other
N-ary tree refers to the rooted tree in which each node having atmost k child nodes. The diameter of n-ary tree is the longest path between two leaf nodes. Vari
Background A Database Management System (DBMS) stores data in the form of tables, uses ER model and the goal is ACID properties. For example a DBMS of college h
A data-warehouse is a heterogeneous collection of different data sources organised under a unified schema. There are 2 approaches for constructing data-warehous
Prerequisite – Data Warehousing Data warehouse can be controlled when the user has a shared way of explaining the trends that are introduced as specific subje
Prerequisite – DBMS | File Organization – Set 1, File Organization-Set 2 B+ Tree File Organization – B+ Tree, as the name suggests, It uses a tree like st
In general terms, “Mining” is the process of extraction of some valuable material from the earth e.g. coal mining, diamond mining etc. In the context of com
Prerequisites – Data Warehousing, Data Warehouse Architecture, Characteristics and Functions of Data warehouse Here are some of the difficulties of Implementi
Data Mining – Knowledge Discovery in Databases(KDD). Why we need Data Mining? Volume of information is increasing everyday that we can handle from business tr
Datawarehouse and Data Mart, both are storage components of HDFS. Data mart is such a storage component which is concerned on a specific department of an organi
In this post, we will discuss what are different sources of data that are used in data mining process. The data from multiple sources are integrated into a comm
Prerequisite – Introduction to Hadoop, Apache Hive The major components of Hive and its interaction with the Hadoop is demonstrated in the figure below and al
With the phenomenal growth in digital data, particularly generated from multi-media and other enterprise application the need for high-performance storage solut
The ODBMS which is an abbreviation for object oriented database management system, is the data model in which data is stored in form of objects, which are insta
Prerequisites – Introduction to Hadoop, Computing Platforms and Technologies Apache Hive is a data warehouse and an ETL tool which provides an SQL-like interf
Prerequisites – Introduction to Hadoop, Apache HBase HBase architecture has 3 main components: HMaster, Region Server, Zookeeper. Figure – Architecture of H
Prerequisite – Introduction to Hadoop HBase is a data model that is similar to Google’s big table. It is an open source, distributed database developed by A
You are given a m litre jug and a n litre jug . Both the jugs are initially empty. The jugs don’t have markings to allow measuring smaller quantities. You hav