Más contenido relacionado La actualidad más candente (20) Similar a Computer notes - Binary Search (20) Más de ecomputernotes (20) Computer notes - Binary Search1. Class No.32 Data Structures http://ecomputernotes.com 13. Case 1: val == a[mid] val = 10 low = 0, high = 8 5 7 9 10 13 17 19 1 27 a: low high Binary Search http://ecomputernotes.com 1 2 3 4 5 6 7 0 8 mid mid = (0 + 8) / 2 = 4 10 14. Case 2: val > a[mid] val = 19 low = 0, high = 8 mid = (0 + 8) / 2 = 4 Binary Search -- Example 2 5 7 9 10 1 a: mid low high http://ecomputernotes.com 13 17 19 27 1 2 3 4 5 6 7 0 8 new low new low = mid+1 = 5 13 17 19 27 15. Case 3: val < a[mid] val = 7 low = 0, high = 8 mid = (0 + 8) / 2 = 4 Binary Search -- Example 3 10 13 17 19 27 a: mid low high http://ecomputernotes.com 5 7 9 1 1 2 3 4 5 6 7 0 8 new high new high = mid-1 = 3 5 7 9 1 16. val = 7 Binary Search -- Example 3 (cont) 5 7 9 10 13 17 19 1 27 1 2 3 4 5 6 7 0 8 a: 5 7 9 10 13 17 19 1 27 1 2 3 4 5 6 7 0 8 a: 5 7 9 10 13 17 19 1 27 1 2 3 4 5 6 7 0 8 a: 28. Skip List: formally 56 64 78 31 34 44 12 23 26 S 0 64 31 34 23 S 1 31 S 2 S 3 40. Skip Lists with Quad Nodes 56 64 78 31 34 44 12 23 26 31 64 31 34 23 S 0 S 1 S 2 S 3 Notas del editor Start of lecture 38. End of Lecture 38 Start lecture 39 End of lecture 39, Start of lecture 40. End of lecture 40. Start of 41. Start lecture 41 End of lecture 41. Start of lecture 42. End of Lecture 42. Start of lecture 43 after animation.