Skip to content

Commit c8e9a28

Browse files
Update errata.md
1 parent 515b4e6 commit c8e9a28

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

errata.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,20 @@ Correct code is:
1616
else:
1717
hash_text[i] = ((hash_text[i-1] - ord_text[i-1]) + ord_text[i+len_pattern-1]) # calculating next hash value using previous value
1818
```
19+
20+
## Chapter 3, Page 61 - Fixed the missing '/'
21+
22+
There should be `//` in place of `/`
23+
24+
Incorrect code is:
25+
```
26+
mid = start + (end - start)/2
27+
if arr[mid] == key:
28+
return mid
29+
```
30+
Correct code is:
31+
```
32+
mid = start + (end - start)//2
33+
if arr[mid] == key:
34+
return mid
35+
```

0 commit comments

Comments
 (0)