Data Structure and Algorithms Using C++
eBook - ePub

Data Structure and Algorithms Using C++

A Practical Implementation

Sachi Nandan Mohanty, Pabitra Kumar Tripathy

Condividi libro
  1. English
  2. ePUB (disponibile sull'app)
  3. Disponibile su iOS e Android
eBook - ePub

Data Structure and Algorithms Using C++

A Practical Implementation

Sachi Nandan Mohanty, Pabitra Kumar Tripathy

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Everyone knows that programming plays a vital role as a solution to automate and execute a task in a proper manner. Irrespective of mathematical problems, the skills of programming are necessary to solve any type of problems that may be correlated to solve real life problems efficiently and effectively. This book is intended to flow from the basic concepts of C++ to technicalities of the programming language, its approach and debugging. The chapters of the book flow with the formulation of the problem, it's designing, finding the step-by-step solution procedure along with its compilation, debugging and execution with the output. Keeping in mind the learner's sentiments and requirements, the exemplary programs are narrated with a simple approach so that it can lead to creation of good programs that not only executes properly to give the output, but also enables the learners to incorporate programming skills in them. The style of writing a program using a programming language is also emphasized by introducing the inclusion of comments wherever necessary to encourage writing more readable and well commented programs. As practice makes perfect, each chapter is also enriched with practice exercise questions so as to build the confidence of writing the programs for learners. The book is a complete and all-inclusive handbook of C++ that covers all that a learner as a beginner would expect, as well as complete enough to go ahead with advanced programming. This book will provide a fundamental idea about the concepts of data structures and associated algorithms. By going through the book, the reader will be able to understand about the different types of algorithms and at which situation and what type of algorithms will be applicable.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Data Structure and Algorithms Using C++ è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Data Structure and Algorithms Using C++ di Sachi Nandan Mohanty, Pabitra Kumar Tripathy in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Informatica e Programmazione in C. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2021
ISBN
9781119752035
Edizione
1
Argomento
Informatica

1
Introduction to Data Structure

1.1 Definition and Use of Data Structure

Data structure is the representation of the logical relationship existing between individual elements of data. In other words the data structure is a way of organizing all data items that considers not only the elements stored but also their relationship to each other.
Data structure specifies
  • Organization of data
  • Accessing methods
  • Degree of associativity
  • Processing alternatives for information
The data structures are the building blocks of a program and hence the selection of a particular data structure stresses on
  • The data structures must be rich enough in structure to reflect the relationship existing between the data, and
  • The structure should be simple so that we can process data effectively whenever required.
In mathematically Algorithm + Data Structure = Program
Finally we can also define the data structure as the “Logical and mathematical model of a particular organization of data”

1.2 Types of Data Structure

Data structure can be broadly classified into two categories as Linear and Non-Linear
Schematic illustration of a tree diagram depicting the classification of the data structure.
Linear Data Structures
In linear data structures, values are arranged in linear fashion. Arrays, linked lists, stacks, and queues are the examples of linear data structures in which values are stored in a sequence.
Non-Linear Data Structure
This type is opposite to linear. The data values in this structure are not arranged in order. Tree, graph, table, and sets are the examples of nonlinear data structure.
Operations Performed in Data Structure
In data structure we can perform the operations like
  • Traversing
  • Insertion
  • Deletion
  • Merging
  • Sorting
  • Searching

1.3 Algorithm

The step by step procedure to solve a problem is known as the ALGORITHM. An algorithm is a well-organized, pre-arranged, and defined computational module that receives some values or set of values as input and provides a single or set of values as out put. These well-defined computational steps are arranged in sequence, which processes the given input into output.
An algorithm is said to be accurate and truthful only when it provides the exact wanted output.
The efficiency of an algorithm depends on the time and space complexities. The complexity of an algorithm is the function which gives the running time and/or space in terms of the input size.
Steps Required to Develop an Algorithm
  • Finding a method for solving a problem. Every step of an algorithm should be defined in a precise and in a clear manner. Pseudo code is also used to describe an algorithm.
  • The next step is to validate the algorithm. This step includes all the steps in our algorithm and should be done manually by giving the required input, perform the required steps including in our algorithm and should get the required amount of output in a finite amount of time.
  • Finally implement the algorithm in terms of programming language.
Mathematical Notations and Functions
  • Floor and Ceiling Functions
  • Floor function returns the greatest integer that does not exceed the number.
  • Ceiling function returns the least integer that is not less than the number.
    images
  • Remainder Function
    To find the remainder “mod” function is being used as
    images
  • To find the Integer and Absolute value of a number
    INT(5.34) = 5 This statement returns the integer part of the number
    INT(- 6.45) = 6 This statement returns the absolute as well as the integer portion of the number
  • Summation Symbol
    To add a series of number as a1+ a2 + a3 +............+ an the symbol Σ is used
    images
  • Factorial of a Number
    The product of the positive integers from 1 to n is known as the factorial of n and it is denoted as n!.
    images
Algorithemic Notations
While writing the algorithm the comments are provided with in [ ].
The assignment should use the symbol “: =” instead of “=”
For Input use Read : variable name
For output use write : message/variable name
The control structures can also be allowed to use inside an algorithm but their way of approaching will be some what different as
Simple If
 If condition, then: Statements [end of if structure] 
If...else
 If condition, then: Statements Else : Statements [end of if structure] 
If...else ladder
 If condition1, then: Statements Else If condition2, then: Statements Else If condition3, then: Statements ………………………………………… ………………………………………… ………………………………………… Else If conditionN, then: Statements Else: Statements [end of if structure]
LOOPING CONSTRUCT
 Repeat for var = start_value to end_value by step_value ...

Indice dei contenuti