fixed typos
authorPhilip Durbin <philipdurbin@gmail.com>
Mon, 23 Apr 2012 03:37:17 +0000 (23:37 -0400)
committerPhilip Durbin <philipdurbin@gmail.com>
Mon, 23 Apr 2012 03:37:17 +0000 (23:37 -0400)
cs/mit/6/8.mdwn

index b2bd800..0becd8a 100644 (file)
@@ -42,11 +42,11 @@ http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-intr
         numCompares = 0
         while i < len(s) and answer == None:
             numCompares += 1
-        if e == s[i]:
-            answer = True
-        elif e < s[i]:
+            if e == s[i]:
+                answer = True
+            elif e < s[i]:
                 answer = False
-            i += 1
+        i += 1
         print answer, numCompares
 
     def bsearch(s, e, first, last):