Skip to content

Commit cd1e574

Browse files
authored
Merge pull request #2 from MsDiala/array-shift
Array shift
2 parents 45fdcce + f25010d commit cd1e574

File tree

15 files changed

+68
-20
lines changed

15 files changed

+68
-20
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"ponicode.testSettings.testLocation.locationType": "Same folder as source file",
3-
"ponicode.testSettings.testLocation.path": "{rootDir}/{filePath}/{fileName}.test.{ext}"
3+
"ponicode.testSettings.testLocation.path": "{rootDir}/{filePath}/{fileName}.test.{ext}",
4+
"python.pythonPath": ".venv/bin/python3.9"
45
}

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
# data-structures-and-algorithms-python
1+
# data-structures-and-algorithms-python
2+
# Challenge Summary
3+
IT was eady
4+
## Challenge Description
5+
I did a tests to a shift array
6+
## Approach & Efficiency
7+
TDD
8+
## Solution
9+
![Getting Started](dddddddddddd.png)
204 Bytes
Binary file not shown.
Binary file not shown.

data_structures_and_algorithms/challenges/array_reverse/array_reverse.py

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def array_shift(l,b):
2+
middle = len(l) // 2
3+
if len(l) % 2 == 0:
4+
5+
return l[:middle] + [b] + l[middle:]
6+
else:
7+
return l[:middle + 1] + [b] + l[middle +1:]
8+
Binary file not shown.
Binary file not shown.

dddddddddddd.png

314 KB
Loading
158 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)