ebook img

Data structures and algorithms with C PDF

354 Pages·2018·4.699 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Data structures and algorithms with C

Data Structures and Algorithms with C Data Structures and Algorithms with C Debdutta Pal Suman Halder α Alpha Science International Ltd. Oxford, U.K. Data Structures and Algorithms with C 352 pages Debdutta Pal Suman Halder Department of Computer Science and Engineering Calcutta Institute of Engineering and Management Kolkata Copyright © 2018 ALPHA SCIENCE INTERNATIONAL LTD. 7200 The Quorum, Oxford Business Park North Garsington Road, Oxford OX4 2JZ, U.K. www.alphasci.com ISBN 978-1-78332-368-5 Printed from the camera-ready copy provided by the Authors. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior written permission of the publisher. Dedicated to Our Parents Preface This book is designed as a stepping stone for the students to enter into the world of computer science and engineering. All the students irrespective of different domain of technology if want to build carrier in the Computer Science and Engineering domain have to have enough knowledge in data structures. The Data structure is a course that helps students to accumulate knowledge about how data are stored and manipulated in the memory of any computing device. This book is written for the students who have knowledge about C and now are going to open their eyes in the domain of data structure. Hence, the prospective audience for this book consists primarily of sophomores and juniors majoring in computer science or computer engineering. Chapter 1, in this book is designed in such a way that the students having no knowledge in data structure can boldly step forward into the zone of data structure. This chapter has a detail overview on a data structure that includes definition of data structure, the categorisation of data structure. Operation on different data structure is also included in this chapter. The chapter ends with application of data structure. Chapter 2, can be defined as a soul of this book. This chapter includes details of the algorithm. Definition of algorithm, life cycle of algorithm. Time complexity and space complexity measurement is explained in this chapter. Students will come to know about asymptotic notation and the manipulation of asymptotic notation in this chapter. Classification of the algorithm is also a major part of this chapter. In the chapter 3, array is defined in broad way. The chapter includes details of one dimensional (1-D) array. Multidimensional array is also explained here. Address calculations of one and two dimensional array are shown in this chapter. Representation of a sparse matrix is given here. Manipulation of string is a major part of this chapter. Chapter 4 can be defined as a heart of this chapter. This includes classification of pointers and array of pointers. Dynamic memory allocation (DMA) is one of the major contributions in this chapter. Stu- dents will learn about different predefined functions that are used for DMA. They will also build their knowledge about need of DMA and the shortcomings of DMA. Dynamically allocated spaces are how to de-allocate that is also explained here. Creation of one dimensional and two dimensional arrays using dynamic memory allocation is explained here. In the chapter 5, detail of another a linear data structure is described. The name of this data structure is “Link List”. This chapter initiates with linear link list and finally it concludes with a doubly link list. Creation, traversal, insertion, deletion, reverse operations on the single link list, circular link list and the doubly link list are explained in broad way. Both algorithms and programs are given for each operation to make this chapter more student approachable. This chapter is application of DMA. Chapter 6 deals with different aspects of Stack and Queue. The first part of this chapter explains Stack definition and basic operations on Stack. It is followed by the application of Stack in POSTFIX, PREFIX expression. Implementations of Stack using link list and array are also included in this chapter. Second part of this chapter is all about Queue. Definition of the Queue and basic operations on queue are specified here. Then categorisation of Queue is also given here. Different types of Queues like circular queue, de-queue and priority queue are explained with example. Each operation on Stack and Queue is accompanied with algorithm and programs. viii Preface In chapter 7, recursion is explained in a comprehensive way. When students reach at this chapter they have acquired knowledge about non recursive functions. After completion of this chapter, students will come to know about recursive function. This chapter deals with the need of recursion, depth of recursion, type of recursion and the shortcomings of recursive functions. This chapter concludes with bags of programs on recursion that make students more familiar with recursion. Chapter 8 involves a non-linear data structure. Until now the students accumulate their knowledge about the linear data structure. With this chapter they will reveal another look of data structure. This chapter focuses on Tree structure. This chapter initiates with binary tree followed by a binary search tree and end with multi way search tree. Each type of tree structure is explained with some basic operations on tree like creation, insertion of node, traversal, and deletion of nodes. Height balance tree is one of the major contributions of this chapter. Chapter 10 focuses on another very important part of data structure that is Graph. Here, the graph is explained in detail. The chapter introduces the different terminology of graph like nodes, link, adjacent node, complete graph, path, circuit, walk, degree of vertex, etc.; it is followed by the memory repre- sentation of the graph. Then memory representation of a graph is explained in terms of the adjacency matrix, adjacency list, multi list, incident matrix. Then different graph traversal algorithm is explained. Spanning tree formation is also shown here by the means of Prim’s algorithm and Kruskal algorithm. The chapter also includes some algorithm to find shortest path using Bellman-Ford algorithm, Dijkstra’s algorithm, and Floyed-Warshall algorithm. The chapter concludes with different application of graph in different aspects of computer science and engineering fields. To make it easy -for student programs are also written for all the algorithm explain in this chapter. Some lemmas are written for students who are going to study design analysis and algorithm. In chapter 10, different types of searching and sorting algorithms are explained. For each searching and sorting algorithm recurrence relation is also derived using different approaches. The algorithms are explained with the help of examples in each case. Each sorting and searching algorithm is accompanied with programs so that the students can easily understand the algorithm and run the program without any difficulties. This chapter includes some basic sorting algorithm like bubble sort, insertion sort, merge sort, quick sort and also some advance sorting technique like radix sort, heap sort and shell sort. Chapter 11 deals with hashing technique. It explains different terminology relates to hashing like hash function, hash table. This chapter also describes different types of hashing procedure with examples. Collision resolution techniques are also described in this chapter. Here, creation of hash table, insert in a hash table and delete from a hash table is explained with algorithm and program. Chapter 12, the concluding chapter of this book gives a glimpse on file handling. Here, different ways of storing records in a file are explained. Indexing of records and searching of records from a file are also described in this chapter. Debdutta Pal Suman Halder

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.