jagomart
digital resources
picture1_Problem Solving Book Pdf 178538 | Main Item Download 2023-01-29 16-52-13


 129x       Filetype PDF       File size 1.41 MB       Source: www.csc.kth.se


File: Problem Solving Book Pdf 178538 | Main Item Download 2023-01-29 16-52-13
principles of algorithmic problem solving johansannemo october24 2018 ii this version of the book is a preliminary draft expect to nd typos and other mistakes if you do please report ...

icon picture PDF Filetype PDF | Posted on 29 Jan 2023 | 2 years ago
Partial capture of text on file.
       Principles of Algorithmic Problem Solving
                 JohanSannemo
                 October24,2018
        ii
            This version of the book is a preliminary draft. Expect to
            find typos and other mistakes. If you do, please report
            them to ❥♦❤❛♥✳s❛♥♥❡♠♦✰❜♦♦❦❅❣♠❛✐❧✳❝♦♠. Before report-
            ing a bug, please check whether it still exists in the lat-
            est version of this draft, available at ❤tt♣✿✴✴❝s❝✳❦t❤✳s❡✴
            ⑦❥s❛♥♥❡♠♦✴s❧❛s❦✴♠❛✐♥✳♣❞❢.
                             Contents
                             Preface                                                                                                                              ix
                             ReadingthisBook                                                                                                                      xi
                             I      Preliminaries                                                                                                                  1
                             1     AlgorithmsandProblems                                                                                                           3
                                   1.1       ComputationalProblems . . . . . . . . . . . . . . . . . . . . . . .                                                   4
                                   1.2       Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                              5
                                             1.2.1        Correctness . . . . . . . . . . . . . . . . . . . . . . . . . .                                          8
                                   1.3       ProgrammingLanguages . . . . . . . . . . . . . . . . . . . . . .                                                      9
                                   1.4       PseudoCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                              10
                                   1.5       TheKattisOnlineJudge . . . . . . . . . . . . . . . . . . . . . . .                                                  12
                                   1.6       Additional Exercises . . . . . . . . . . . . . . . . . . . . . . . . .                                              13
                                   1.7       ChapterNotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                              14
                             2     ProgramminginC++                                                                                                               17
                                   2.1       DevelopmentEnvironments . . . . . . . . . . . . . . . . . . . . .                                                   18
                                             2.1.1        Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . .                                         18
                                             2.1.2        Ubuntu . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                       19
                                             2.1.3        macOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                        19
                                             2.1.4        Installing the C++ tools                     .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   19
                                   2.2       Hello World! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                            20
                                   2.3       Variables and Types . . . . . . . . . . . . . . . . . . . . . . . . . .                                             23
                                   2.4       Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . .                                              29
                                   2.5       Operators             .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   30
                                                                                                iii
                             iv                                                                                                                CONTENTS
                                   2.6       If Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                           33
                                   2.7       For Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                             36
                                   2.8       WhileLoops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                              39
                                   2.9       Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                           40
                                   2.10 Structures                 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   43
                                   2.11 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                  47
                                   2.12 The Preprocessor . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                   48
                                   2.13 Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                 49
                                   2.14 Additional Exercises . . . . . . . . . . . . . . . . . . . . . . . . .                                                   49
                                   2.15 Chapter Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                  50
                             3     TheC++StandardLibrary                                                                                                          51
                                   3.1       ✈❡❝t♦r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                            52
                                             3.1.1        Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                      53
                                   3.2       q✉❡✉❡ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                           55
                                   3.3       st❛❝❦ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                           56
                                   3.4       ♣r✐♦r✐t②❴q✉❡✉❡ . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                               57
                                   3.5       s❡tand♠❛♣ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                               58
                                   3.6       Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                            60
                                   3.7       Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                             61
                                             3.7.1        Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                       61
                                             3.7.2        Searching . . . . . . . . . . . . . . . . . . . . . . . . . . .                                        62
                                             3.7.3        Permutations . . . . . . . . . . . . . . . . . . . . . . . . .                                         63
                                   3.8       Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                           64
                                             3.8.1        Conversions . . . . . . . . . . . . . . . . . . . . . . . . . .                                        64
                                   3.9       Input/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                              65
                                             3.9.1        Detecting End of File . . . . . . . . . . . . . . . . . . . . .                                        66
                                             3.9.2        Input Line by Line . . . . . . . . . . . . . . . . . . . . . .                                         66
                                             3.9.3        OutputDecimalPrecision . . . . . . . . . . . . . . . . . .                                              67
                                   3.10 Additional Exercises . . . . . . . . . . . . . . . . . . . . . . . . .                                                   68
                                   3.11 Chapter Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                  68
                             4     ImplementationProblems                                                                                                        69
                                   4.1       Additional Exercises . . . . . . . . . . . . . . . . . . . . . . . . .                                              86
                                   4.2       ChapterNotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                              86
                             5     TimeComplexity                                                                                                                 87
                                   5.1       TheComplexityofInsertionSort . . . . . . . . . . . . . . . . . .                                                     87
                                   5.2       AsymptoticNotation . . . . . . . . . . . . . . . . . . . . . . . . .                                                 91
The words contained in this file might help you see if this file matches what you are looking for:

...Principles of algorithmic problem solving johansannemo october ii this version the book is a preliminary draft expect to nd typos and other mistakes if you do please report them s before ing bug check whether it still exists in lat est available at tt sts ss contents preface ix readingthisbook xi i preliminaries algorithmsandproblems computationalproblems algorithms correctness programminglanguages pseudocode thekattisonlinejudge additional exercises chapternotes programminginc developmentenvironments windows ubuntu macos installing c tools hello world variables types input output operators iii iv statements for loops whileloops functions structures arrays preprocessor template chapter notes thec standardlibrary t r iterators q st rtq stand math sorting searching permutations strings conversions detecting end file line by outputdecimalprecision implementationproblems...

no reviews yet
Please Login to review.