6
Algorithms and Data Structures (CSC112) Handout -1 Introduction to Algorithms and Data Structures Algorithms and Data Structures Static Data Structures Searching Algorithms Sorting Algorithms List implementation through Array ADT: Stack ADT: Queue Dynamic Data Structures (Linear) Linked List (Linear Data Structure) Dynamic Data Structures (Non-Linear) Trees, Graphs, Hashing 3 steps in the study of data structures Logical or mathematical description of the structure Implementation of the structure on the computer

Algorithms and Data Structures

Embed Size (px)

DESCRIPTION

csc112

Citation preview

Algorithms and Data Structures(CSC112)Handout -1Introduction to Algorithms and Data Structures Algorithms and Data Structures Static Data Structures Searching Algorithms Sorting Algorithms List implementation through Array ADT: Stack ADT: Queue Dynamic Data Structures (Linear) Linked List (Linear Data Structure) Dynamic Data Structures (Non-Linear) Trees, raphs, !ashing3 steps in the study of data structures Logical or mathematical description o" the structure #mplementation o" the structure on the computer Quantitati$e analysis o" the structure, %hich includes determining the amount o" memory needed to store the structure and the time re&uired to process the structureists (Array !in"ed ist)#tems ha$e a position in this 'ollection (andom access or not)Array ists internal storage container is nati$e arrayin"ed istspu*lic class Node+ pri$ate ,*-ect data.pri$ate Node ne/t.0Stac"s 'ollection %ith access only to the last element inserted Last in "irst out insert1push remo$e1pop top make empty#ueue$rees Similar to a linked listpu*lic class TreeNode+ pri$ate ,*-ect data.pri$ate TreeNode le"t.pri$ate TreeNode right.0Hash $a%les Take a key, apply "unction "(key) 2 hash $alue store data or o*-ect *ased on hash $alue Sorting ,(N), access ,(3) i" a per"ect hash "unction and enough memory "or ta*le ho% deal %ith collisions)-----------------------------------------------