diff options
Diffstat (limited to 'challenge-228/eric-cheung/python/ch-2.py')
| -rwxr-xr-x | challenge-228/eric-cheung/python/ch-2.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-228/eric-cheung/python/ch-2.py b/challenge-228/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..6f74b418c1 --- /dev/null +++ b/challenge-228/eric-cheung/python/ch-2.py @@ -0,0 +1,13 @@ +
+## arrInt = [3, 4, 2] ## Example 1
+arrInt = [1, 2, 3] ## Example 2
+
+nCount = 0
+
+while len(arrInt) > 0:
+ if arrInt[0] > min(arrInt):
+ arrInt.append(arrInt[0])
+ del arrInt[0]
+ nCount = nCount + 1
+
+print (nCount)
|
