Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Programming Interviews Exposed

You're reading from   Programming Interviews Exposed Coding Your Way Through the Interview

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Wiley
ISBN-13 9781119418474
Length 384 pages
Edition 4th Edition
Tools
Concepts
Arrow right icon
Authors (3):
Arrow left icon
John Mongan John Mongan
Author Profile Icon John Mongan
John Mongan
Noah Suojanen Kindler Noah Suojanen Kindler
Author Profile Icon Noah Suojanen Kindler
Noah Suojanen Kindler
Eric Giguère Eric Giguère
Author Profile Icon Eric Giguère
Eric Giguère
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface Introduction 1 Before the Search FREE CHAPTER 2 The Job Application Process 3 The Phone Screen 4 Approaches to Programming Problems 5 Linked Lists 6 Trees and Graphs 7 Arrays and Strings 8 Recursion 9 Sorting 10 Concurrency 11 Object-Oriented Programming 12 Design Patterns 13 Databases 14 Graphics and Bit Manipulation 15 Data Science, Random Numbers, and Statistics 16 Counting, Measuring, and Ordering Puzzles 17 Graphical and Spatial Puzzles 18 Knowledge-Based Questions 19 Nontechnical Questions End User License Agreement
Appendix: Résumés

SORTING ALGORITHMS

Choosing the right sorting algorithm can have a huge impact on application performance. What’s right in one situation isn’t necessarily right for another. Here are some criteria to consider when selecting a sorting algorithm:

  • How much data is to be sorted? For small data sets it doesn’t matter which algorithm you choose because there is little difference in the execution times, but for large data sets, the worst-case bounds become radically different. Beware of data sets that are typically small but may occasionally be much larger—you need to select an algorithm that performs acceptably on the largest data sets your code may encounter.
  • Does the data fit in memory? Most sorting algorithms are efficient only when the data they operate on resides in memory. If the data set is too large for memory, you may need to split it into smaller chunks for sorting and then combine those sorted chunks to create the final sorted data set.
  • Is the data already...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images