Table of Contents Problem Solving Techniques 5 Summary: Table of Contents Prologue 1 Problem Solving Techniques 5 I Problems 13 1 Searching 14 1.1 Computing square roots . . . . . . . . . . . . . . . . . . . . . . . 15 1.2 Search a sorted array for k . . . . . . . . . . . . . . . . . . . . . . 16 1.3 Search a sorted array for the first element larger than k . . . . . 16 1.4 Search a sorted array for A[i] = i . . . . . . . . . . . . . . . . . . 16 1.5 Search an array of unknown length . . . . . . . . . . . . . . . . . 16 1.6 Missing element, limited resources . . . . . . . . . . . . . . . . . 16 1.7 Intersect two sorted arrays . . . . . . . . . . . . . . . . . . . . . . 16 1.8 Anagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.9 Search for a pair which sums to S . . . . . . . . . . . . . . . . . . 17 1.10 Anonymous letter . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.11 Pairing users by attributes . . . . . . . . . . . . . . . . . . . . . . 18 1.12 Missing element . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.13 Robot battery capacity . . . . . . . . . . . . . . . . . . . . . . . . 18 1.14 Search for majority . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.15 Search for frequent items . . . . . . . . . . . . . . . . . . . . . . . 19 Collections: Computer Technologies and Information Sciences