Overview of this book

Explore a new world of data structures and their applications easily with this data structures book. Written by software expert William Smith, you?ll learn how to master basic and advanced data structure concepts. ? Fully understand data structures using Java, C and other common languages ? Work through practical examples and learn real-world applications ? Get to grips with data structure problem solving using case studies
Everyday Data Structures
Credits
www.PacktPub.com
Customer Feedback
Preface
Free Chapter
Data Types: Foundational Structures
Arrays: Foundational Collections
Lists: Linear Collections
Stacks: LIFO Collections
Queues: FIFO Collections
Dictionaries: Keyed Collections
Sets: No Duplicates
Structs: Complex Types
Trees: Non-Linear Structures
Heaps: Ordered Trees
Graphs: Values with Relationships
Sorting: Bringing Order Out Of Chaos
Searching: Finding What You Need

Recursion

Although many programmers and even computer science students have a difficult time understanding recursion, the concept is actually quite simple. Plainly stated, recursion is repeatedly performing the same operation by having the method of that operation invoke itself. Therefore, any function that calls an instance of itself is a recursive function. As a matter of fact, if a function `f()` calls another function `g()` which in turn may call function `f()` again, this is still a recursive function because `f()` eventually calls itself. Recursion is an excellent tool for solving complex problems where the solution to the problem is based on the solution to smaller examples of the same problem.

The concept of recursion, or recursive functions, is so powerful that almost every modern computer language supports it by providing the ability for a method to call itself. However, before you define a recursive function, you should be aware any function that calls itself could very easily become an...