mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-05 17:08:02 +00:00
Fix typos (#191)
This commit is contained in:
committed by
Donne Martin
parent
cd9e9654bc
commit
9f89a51aba
@@ -100,7 +100,7 @@
|
||||
"from nose.tools import assert_equal\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"class TestMaximingXor(object):\n",
|
||||
"class TestMaximizingXor(object):\n",
|
||||
"\n",
|
||||
" def test_maximizing_xor(self):\n",
|
||||
" solution = Solution()\n",
|
||||
@@ -109,7 +109,7 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" test = TestMaximingXor()\n",
|
||||
" test = TestMaximizingXor()\n",
|
||||
" test.test_maximizing_xor()\n",
|
||||
"\n",
|
||||
"\n",
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
"from nose.tools import assert_equal\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"class TestMaximingXor(object):\n",
|
||||
"class TestMaximizingXor(object):\n",
|
||||
"\n",
|
||||
" def test_maximizing_xor(self):\n",
|
||||
" solution = Solution()\n",
|
||||
@@ -131,7 +131,7 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" test = TestMaximingXor()\n",
|
||||
" test = TestMaximizingXor()\n",
|
||||
" test.test_maximizing_xor()\n",
|
||||
"\n",
|
||||
"\n",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from nose.tools import assert_equal
|
||||
|
||||
|
||||
class TestMaximingXor(object):
|
||||
class TestMaximizingXor(object):
|
||||
|
||||
def test_maximizing_xor(self):
|
||||
solution = Solution()
|
||||
@@ -10,7 +10,7 @@ class TestMaximingXor(object):
|
||||
|
||||
|
||||
def main():
|
||||
test = TestMaximingXor()
|
||||
test = TestMaximizingXor()
|
||||
test.test_maximizing_xor()
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
" * Yes\n",
|
||||
"* Can we get negative inputs?\n",
|
||||
" * Yes\n",
|
||||
"* Can there be duplicate entires in the input?\n",
|
||||
"* Can there be duplicate entries in the input?\n",
|
||||
" * Yes\n",
|
||||
"* Will there always be at least three integers?\n",
|
||||
" * No\n",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
" * Yes\n",
|
||||
"* Can we get negative inputs?\n",
|
||||
" * Yes\n",
|
||||
"* Can there be duplicate entires in the input?\n",
|
||||
"* Can there be duplicate entries in the input?\n",
|
||||
" * Yes\n",
|
||||
"* Will there always be at least three integers?\n",
|
||||
" * No\n",
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
"\n",
|
||||
"borrow = (~a&b) << 1 = 0010\n",
|
||||
"\n",
|
||||
"If the borrow is not zero, we'll need to subtract the borrow from the result. Recusively call the function, passing in result and borrow.\n",
|
||||
"If the borrow is not zero, we'll need to subtract the borrow from the result. Recursively call the function, passing in result and borrow.\n",
|
||||
"\n",
|
||||
"Complexity:\n",
|
||||
"* Time: O(b), where b is the number of bits\n",
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
"\n",
|
||||
"carry = (a&b) << 1 = 1010\n",
|
||||
"\n",
|
||||
"If the carry is not zero, we'll need to add the carry to the result. Recusively call the function, passing in result and carry.\n",
|
||||
"If the carry is not zero, we'll need to add the carry to the result. Recursively call the function, passing in result and carry.\n",
|
||||
"\n",
|
||||
"Below are the values of a, b, and the carry of a = 7 and b = 5, producing the result of 12.\n",
|
||||
"\n",
|
||||
|
||||
Reference in New Issue
Block a user