Abstract
Interviewers usually expect efficient solutions that solve problems within the resource constraints, so it is important for candidates to improve code performance from the perspectives of both time and space consumption. This chapter illustrates strategies to optimize programs by selecting appropriate data structures and algorithms, as well as by making trade-off decisions to balance time and space efficiencies.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2012 Harry He
About this chapter
Cite this chapter
He, H. (2012). Optimization. In: Coding Interviews. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4762-3_7
Download citation
DOI: https://doi.org/10.1007/978-1-4302-4762-3_7
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-4761-6
Online ISBN: 978-1-4302-4762-3
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books