Data Structure and Algorithms Using C++
eBook - ePub

Data Structure and Algorithms Using C++

A Practical Implementation

Sachi Nandan Mohanty, Pabitra Kumar Tripathy

  1. English
  2. ePUB (apto para móviles)
  3. Disponible en iOS y Android
eBook - ePub

Data Structure and Algorithms Using C++

A Practical Implementation

Sachi Nandan Mohanty, Pabitra Kumar Tripathy

Detalles del libro
Vista previa del libro

Información del 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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Data Structure and Algorithms Using C++ un PDF/ePUB en línea?
Sí, puedes acceder a Data Structure and Algorithms Using C++ de Sachi Nandan Mohanty, Pabitra Kumar Tripathy en formato PDF o ePUB, así como a otros libros populares de Computer Science y Programming in C. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.


Computer Science
Programming in C

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.
  • ❖ Remainder Function
    To find the remainder “mod” function is being used as
  • ❖ 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
  • ❖ 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!.
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 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]
 Repeat for var = start_value to end_value by step_value ...


  1. Cover
  2. Table of Contents
  3. Title Page
  4. Copyright
  5. Preface
  6. 1 Introduction to Data Structure
  7. 2 Review of Concepts of ‘C++’
  8. 3 Sparse Matrix
  9. 4 Concepts of Class
  10. 5 Stack
  11. 6 Queue
  12. 7 Linked List
  13. 8 TREE
  14. 9 Graph
  15. 10 Searching and Sorting
  16. 11 Hashing
  17. Index
  18. End User License Agreement
Estilos de citas para Data Structure and Algorithms Using C++

APA 6 Citation

Mohanty, S. N., & Tripathy, P. K. (2021). Data Structure and Algorithms Using C++ (1st ed.). Wiley. Retrieved from (Original work published 2021)

Chicago Citation

Mohanty, Sachi Nandan, and Pabitra Kumar Tripathy. (2021) 2021. Data Structure and Algorithms Using C++. 1st ed. Wiley.

Harvard Citation

Mohanty, S. N. and Tripathy, P. K. (2021) Data Structure and Algorithms Using C++. 1st edn. Wiley. Available at: (Accessed: 15 October 2022).

MLA 7 Citation

Mohanty, Sachi Nandan, and Pabitra Kumar Tripathy. Data Structure and Algorithms Using C++. 1st ed. Wiley, 2021. Web. 15 Oct. 2022.