Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fundamentals of Algorithms and Data structures

Fundamentals of Algorithms and Data structures

Presentation made to members of #wecodeng July 22, 2017 meetup.

Ezeh Emmanuel

July 22, 2017
Tweet

Other Decks in Programming

Transcript

  1. Fundamentals of Algorithms and Data structures Wecode Meetup July Edition

    EZEH EMMANUEL C. Senior Software Engineer InsightAfrica Consulting Ltd
  2. Why you should learn Algorithms and Data structures. • It

    enhances your reasoning and general cognitive abilities • Saves your company costs buying expensive hardware. • Become a world class software engineer. • Figure out solutions easily by noticing patterns amongst related problem set.
  3. Algorithms • Algorithms can be defined as a set of

    steps to accomplish a task. • Ironically it can be defined as what a programmer did when he is not sure how he solved a problem. • Examples: Finding the maximum element in an array, Finding the optimal route to deliver a packet, “Shopping for items in a grocery store”. Simple algorithmic problems. • Find the sum of numbers from 1 to 100 • Find the sum of the squares of the first 100 numbers Asymptotic Complexity Big O notation is used in Computer Science to describe the performance or complexity of an algorithm. • O(1), O(n), O(logn), O(nlogn), O(n^2), O(n^3)
  4. Data structures A Data structure is a specialized format for

    organising, storing and retrieving data. Different kinds of data structures are better suited for certain kinds of task. For instance SQL databases commonly use B-tree indexes for data storage, while compilers use Hash tables to look up identifiers. Examples of commonly used Data structures • Linear data structures: Array, List, LinkedList, Queue, Stack • Set • Hash Table • Tree • Graph
  5. Sample Exercises 1)What is the best data structure to implement

    a browser history? 2)What is the best datastructure to implement a call / function return sequence? 3)Find the nth fibonacci number using recursion. 4)Optimise the solution in (3) for performance using any data structure of choice.
  6. Recommended Materials BOOKS • The art of computer programming –

    Donald Knuth • Introductions to Algorithms – Thomas Cormen et al WEBSITES • Hackerrank.com • Codility.com • Topcoder.com • Quora.com