Documents

Algorithms_Data_Structures_GATE_Computer_Science_Postal_study_Material.pdf

Description
GATE- 2016-17 Postal Correspondence 1 Algorithms & Data Structures Computer Science & Information Technology (CS) 20 Rank under AIR 100 Postal Correspondence  Examination Oriented Theory, Practice Set  Key concepts, Analysis & Summary
Categories
Published
of 15
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
  GATE-2016-17   GATE Solut 28-B/7, Jia Sarai, Near II  Al Infor 2 Posta  Examinat  Key conc Postal C  ions© 2015ENGINEERS INSTITUTE OF INDIA®. All Ri   T, Hauz Khas, New Delhi-110016. Ph. 011-26514888.w orithms & Structures omputer Scien&ation Technolo Rank under AIR 1 l Correspon onOrientedTheory, P pts, Analysis & Summ  rrespondence 1  ghts Reserved w.engineersinstitute.com  ata  e y (CS)  00  ence  actice Set ry  GATE-2016-17  Postal Correspondence 2 GATE Solutions© 2015ENGINEERS INSTITUTE OF INDIA®. All Rights Reserved28-B/7, Jia Sarai, Near IIT, Hauz Khas, New Delhi-110016. Ph. 011-26514888.www.engineersinstitute.com CONTENT:ALGORITHM & DATA STRUCTURE 1. C POINTERS……………………………………………………………… 03-142. ARRAY…………………………………………………………………… 15-263. HANDLINGSTRINGS, DYNAMIC MEMORY ALLOCATION27-364. STACK…………………………………………………………………… 37-575. QUEUE………………………………………………………………….. 58-786. LINKED LIST………………………………………………………….. 79-947. TREES AND GRAPHS………………………………………………… 95-1098. INTRODUCTION TO ALGORITHM ………………………………..110-1239. RECURRENCE RELATION…………………………………………. 124-12710.DIVIDE AND CONQUER…………………………………………….. 128-14711.OTHER SORTING ALGORITHMS………………………………… 148-15912.DYNAMIC PROGRAMMING………………………………………. 160-16913.GREEDYALGORITHM…………………………………………….. 170-18714.HASHING…………………………………………………………….. 188-19415.AVL TRESS………………………………………………………….. 195-200  GATE-2016-17  Postal Correspondence 3 GATE Solutions© 2015ENGINEERS INSTITUTE OF INDIA®. All Rights Reserved28-B/7, Jia Sarai, Near IIT, Hauz Khas, New Delhi-110016. Ph. 011-26514888.www.engineersinstitute.com CHAPTER-1C POINTERS INTRODUCTION: Pointers are frequently used in C, as they offer number of benefit to the programmer. They include ã Pointers are more efficient in handling array anddata table. ã Pointer can be used to return multiple values from a function via function argument. ã Pointer permit reference to function and thereby facilitating passing of functions asargument to other functions. ã The use of pointer array to character string result in saving of data storage space inmemory. ã Pointer allows C to support dynamic memory management. ã Pointer provides an efficient tool for manipulating dynamic data structure such asstructure linked list queue, stacks and trees. ã Pointer reduces length and complexity of program. ã They reduce length and complexity of program. ã They increase the execution speed and thus reduce the program execution time. Understanding pointers: Whenever we declare a variable then system allocate somewhere in memory, an appropriatelocation to hold the value of variable.Consider the following statement  GATE-2016-17  Postal Correspondence 4 GATE Solutions© 2015ENGINEERS INSTITUTE OF INDIA®. All Rights Reserved28-B/7, Jia Sarai, Near IIT, Hauz Khas, New Delhi-110016. Ph. 011-26514888.www.engineersinstitute.com intx= 80;xvar805000 iablevalueaddress ←←← Representation of variable ã Pointer variable is nothing but a variable that contain an address which is a location of anothervariable in memory.For example: 80500050005048 Variable Value Address x p Pointer variableValue of variable P is the address of variable X ã Address of a variable can be determined by & operator in CFor example: & P x = Would assign 5000to variable P& operator can be used with simple variable or an array element. The following are the illegaluse of address operator  & 125 pointing constant  int x [10]& x (pointing an array name)  & (x + y) (pointing at expression) It x isan array then expression such as & x [0] and & x (i+3) are valid and represent the address
Search
Tags
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks