Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
4cf8dd8
Update solution.py
harishrongala Apr 10, 2020
f28fb8d
Update solution.py
harishrongala Apr 10, 2020
c7b5e9e
Update solution.py
harishrongala Apr 10, 2020
6f1747f
Add gitignore file
Apr 11, 2020
a314722
Merge branch 'master' of github.com:ByteAcademyCo/Exercises
Apr 11, 2020
a565bf3
Update README.md
WasifKhan Apr 11, 2020
4ddfbf4
Update README.md
WasifKhan Apr 24, 2020
d09ef1c
Update README.md
WasifKhan Apr 24, 2020
67d0a69
Update README.md
WasifKhan Apr 24, 2020
410e881
Update README.md
WasifKhan Apr 24, 2020
089f929
Update README.md
WasifKhan Apr 28, 2020
90e798d
Update README.md
WasifKhan Apr 28, 2020
66432fa
Update README.md
WasifKhan Apr 28, 2020
de6b1b6
Update README.md
WasifKhan Apr 28, 2020
2e6dcaf
Update README.md
WasifKhan Apr 28, 2020
b7f4541
Update README.md
WasifKhan Apr 28, 2020
b3fac62
Update README.md
WasifKhan Apr 28, 2020
1c96127
Update README.md
WasifKhan Apr 28, 2020
78c0f21
Update solution.py
harishrongala May 13, 2020
a8023df
Update solution.py
harishrongala May 13, 2020
55df6fc
Update solution.py
harishrongala May 13, 2020
de4c519
Changes needed to test Aiza
harishrongala May 14, 2020
b787fa5
Changes needed to test Aiza
harishrongala May 14, 2020
3b8eeb0
Update solution.py
greg-smith1 May 14, 2020
c9a125a
Update solution.py
greg-smith1 May 14, 2020
dd1745a
Update solution.py
greg-smith1 May 17, 2020
0b0bb78
Reorg folders for integration test
May 18, 2020
a638424
Update solution.py
WasifKhan May 18, 2020
373e883
Update solution.py
WasifKhan May 18, 2020
0f1e2c4
Update solution.py
WasifKhan May 18, 2020
1fd48e3
Update solution.py
WasifKhan May 18, 2020
3c87e07
Update solution.py
WasifKhan May 18, 2020
4b1d893
Update solution.py
WasifKhan May 18, 2020
afe3503
Update solution.py
WasifKhan May 18, 2020
cf6a2b6
Update solution.py
WasifKhan May 18, 2020
8d96dbe
Update solution.py
WasifKhan May 18, 2020
12424b5
Update solution.py
WasifKhan May 18, 2020
2226e75
Update solution.py
WasifKhan May 18, 2020
4879990
Update solution.py
WasifKhan May 18, 2020
453d67e
Update solution.py
WasifKhan May 18, 2020
b82b877
Update solution.py
WasifKhan May 18, 2020
73364f8
Update solution.py
WasifKhan May 18, 2020
6d4e58d
Update solution.py
WasifKhan May 18, 2020
2fa4177
Update solution.py
WasifKhan May 18, 2020
1ec3bc2
Update solution.py
WasifKhan May 18, 2020
d9f7cc8
Update solution.py
WasifKhan May 18, 2020
b0ea4fc
Update solution.py
WasifKhan May 18, 2020
8736b2a
Update solution.py
WasifKhan May 18, 2020
b8c2029
Update solution.py
WasifKhan May 18, 2020
41bf6b9
Update solution.py
WasifKhan May 18, 2020
f27ec24
Update solution.py
WasifKhan May 18, 2020
4319782
Update solution.py
WasifKhan May 18, 2020
c26c41a
Update solution.py
WasifKhan May 18, 2020
b895222
Update solution.py
WasifKhan May 18, 2020
527b3ed
Update solution.py
WasifKhan May 18, 2020
a7a50bd
Update solution.py
WasifKhan May 18, 2020
f617cfa
Update README.md
WasifKhan May 18, 2020
cb2a6e3
Update README.md
WasifKhan May 18, 2020
4a9d0ce
Update README.md
WasifKhan May 18, 2020
0b03439
Update README.md
WasifKhan May 18, 2020
11dd584
Update README.md
WasifKhan May 18, 2020
df07c43
Update README.md
WasifKhan May 18, 2020
fbeb895
README format changed to match OLX gen requirement
May 18, 2020
8f11c96
README format changed to match OLX gen requirement
May 18, 2020
00d57ae
README format changed to match OLX gen requirement
May 18, 2020
841e3e4
README format changed to match OLX gen requirement
May 18, 2020
e6965a6
README format changed to match OLX gen requirement
May 18, 2020
e05924f
README format changed to match OLX gen requirement
May 18, 2020
b837ff9
README format changed to match OLX gen requirement
May 18, 2020
71b9ec7
README format changed to match OLX gen requirement
May 18, 2020
89f3317
README format changed to match OLX gen requirement
May 18, 2020
50e54fc
README format changed to match OLX gen requirement
May 18, 2020
a5f2833
README format changed to match OLX gen requirement
May 18, 2020
8966077
Incomplete Exercises removed
May 18, 2020
e56e4fc
Typo fixed
May 18, 2020
7d74ed4
Merge pull request #2 from ByteAcademyCo/Harish
WasifKhan May 18, 2020
b63bc83
Add data structures exercises
Jun 1, 2020
64bac66
Merge branch 'master' of github.com:ByteAcademyCo/Exercises
Jun 1, 2020
b2b6352
Add LL exercises
Jun 1, 2020
9517995
Merge pull request #1 from ByteAcademyCo/master
NWood-Git Jun 1, 2020
6cf50cb
Add solution.py for Name Bindings
NWood-Git Jun 1, 2020
fdcd097
add bash exercises for Exercise repo
greg-smith1 Jun 20, 2020
6c084ab
fix README for bash exercises
greg-smith1 Jun 20, 2020
e03ea8b
add github links after adding to github
greg-smith1 Jun 20, 2020
ea8811f
add intro and environment exercises
Jun 22, 2020
fe573e7
Update exercise repo
Jun 22, 2020
85cbec9
Update README.md
WasifKhan Jun 22, 2020
4ce2e61
Update README.md
WasifKhan Jun 22, 2020
32076b0
Section Table needed for Grading Instance
harishrongala Jun 22, 2020
a7c116a
update intro and env exercises
greg-smith1 Jun 22, 2020
a7c444f
add new_exercise.txt
greg-smith1 Jun 24, 2020
07b6532
Merge branch 'master' into demo
greg-smith1 Jun 24, 2020
6e43e6a
Merge pull request #4 from greg-smith1/demo
greg-smith1 Jun 24, 2020
eb4451c
update solutions, remove existing code
greg-smith1 Jun 25, 2020
e5e77c8
delete unnecessary text file
greg-smith1 Jun 25, 2020
a66d244
update data types exercises for release
greg-smith1 Jun 25, 2020
c8e9dab
clean up python functions content real quick
greg-smith1 Jun 29, 2020
44ab600
Add recursive functions exercises
Jun 30, 2020
4f89ee2
Merge branch 'master' into master
NWood-Git Jul 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__/
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Exercises

## Modules
* Introduction And Environment
* Introduction To Python
* Data Structures
* Algorithms
* Software Theory
| Module ID | Module Name |
|:-----------:|:--------:|
| 1 | [Introduction and Environment](https://github.com/ByteAcademyCo/Exercises/tree/master/introduction_and_environment) |
| 2 | [Introduction to Python](https://github.com/ByteAcademyCo/Exercises/tree/master/introduction_to_python) |
| 3 | [Data Structures](https://github.com/ByteAcademyCo/Exercises/tree/master/data_structures) |
| 4 | [Algorithms](https://github.com/ByteAcademyCo/Exercises/tree/master/algorithms) |
| 5 | [Software Theory](https://github.com/ByteAcademyCo/Exercises/tree/master/software_theory) |
13 changes: 7 additions & 6 deletions algorithms/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Exercise Organization

## Exercise Sections
* Graph Traversal
* Sorting
* Bit Manipulation
* String Manipulation
* Dynamic Programming
| Section ID | Section Name |
|:-----------:|:--------:|
| 1 | [Graph Traversals](https://github.com/ByteAcademyCo/Exercises/tree/master/algorithms/graph_traversal) |
| 2 | [Sorting](https://github.com/ByteAcademyCo/Exercises/tree/master/algorithms/sorting) |
| 3 | [Bit Manipulation](https://github.com/ByteAcademyCo/Exercises/tree/master/algorithms/bit_manipultion) |
| 4 | [String Manipulation](https://github.com/ByteAcademyCo/Exercises/tree/master/algorithms/string_manipulation) |
| 5 | [Dynamic Programming](https://github.com/ByteAcademyCo/Exercises/tree/master/algorithms/dynamic_programming) |
15 changes: 0 additions & 15 deletions algorithms/graph_traversal/1_length/length.py

This file was deleted.

37 changes: 0 additions & 37 deletions algorithms/graph_traversal/2_most_neighbors/most_neighbors.py

This file was deleted.

59 changes: 0 additions & 59 deletions algorithms/graph_traversal/3_permutations/permutations.py

This file was deleted.

15 changes: 15 additions & 0 deletions data_structures/binary_trees/1_Binary_Search/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Binary Search

## Motivation


# Problem Description
Write a Python program to find the value in a given non-empty Binary Search Tree (BST) of unique values.
Program should return value is found if value is present in tree.


# Testing
*

## Submission
* Submit your answers in the *solution.py* file within the *Solutions* subdirectory within this directory
53 changes: 53 additions & 0 deletions data_structures/binary_trees/1_Binary_Search/Solution/solution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
class Node:

def __init__(self, data):

self.left = None
self.right = None
self.data = data

# Insert method to create nodes
def insert(self, data):

if self.data:
if data < self.data:
if self.left is None:
self.left = Node(data)
else:
self.left.insert(data)
elif data > self.data:
if self.right is None:
self.right = Node(data)
else:
self.right.insert(data)
else:
self.data = data
# findval method to compare the value with nodes
def findval(self, lkpval):
if lkpval < self.data:
if self.left is None:
return str(lkpval)
return self.left.findval(lkpval)
elif lkpval > self.data:
if self.right is None:
return str(lkpval)
return self.right.findval(lkpval)
else:
return self.data
# Print the tree
def PrintTree(self):
if self.left:
self.left.PrintTree()
print( self.data),
if self.right:
self.right.PrintTree()


root = Node(12)
root.insert(6)
root.insert(14)
root.insert(3)
ele = input()
element = int(ele)
result = root.findval(element)
print(result)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
def test_solution(monkeypatch):
a = None
x = 2

def g(num1):
nonlocal a
a = num1

def f():

nonlocal x
return x

monkeypatch.setattr('builtins.print',g)

monkeypatch.setattr('builtins.input',f)

import solution
assert solution.ele==x


11 changes: 11 additions & 0 deletions data_structures/binary_trees/1_Create_BT_Node/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Create Binary Tree With Node

## Motivation
# Problem Description
Write a Python program that creates Binary Tree with Node

# Testing
*

## Submission
* Submit your answers in the *solution.py* file within the *Solutions* subdirectory within this directory
15 changes: 15 additions & 0 deletions data_structures/binary_trees/1_Create_BT_Node/Solution/solution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class Node:

def __init__(self, data):

self.left = None
self.right = None
self.data = data


def PrintTree(self):
print(self.data)

root = Node(10)

root.PrintTree()
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def test_solution(monkeypatch):
a = None

def g(num1):
nonlocal a
a = num1

monkeypatch.setattr('builtins.print',g)

import solution
12 changes: 12 additions & 0 deletions data_structures/binary_trees/1_Insert_into_Tree/READE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Insert Values Into a tree
## Motivation


# Problem Description
Write a Python program insert values into Binary Tree

# Testing
*

## Submission
* Submit your answers in the *solution.py* file within the *Solutions* subdirectory within this directory
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
class Node:

def __init__(self, data):

self.left = None
self.right = None
self.data = data

def insert(self, data):
# Compare the new value with the parent node
if self.data:
if data < self.data:
if self.left is None:
self.left = Node(data)
else:
self.left.insert(data)
elif data > self.data:
if self.right is None:
self.right = Node(data)
else:
self.right.insert(data)
else:
self.data = data

# Print the tree
def PrintTree(self):
if self.left:
self.left.PrintTree()
return self.data
if self.right:
self.right.PrintTree()

# Use the insert method to add nodes
root = Node(12)
root.insert(6)
root.insert(14)
root.insert(3)
result = root.PrintTree()
print(result)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def test_solution(monkeypatch):
a = None

def g(num1):
nonlocal a
a = num1
monkeypatch.setattr('builtins.print',g)

import solution
22 changes: 0 additions & 22 deletions data_structures/binary_trees/1_length/length.py

This file was deleted.

12 changes: 12 additions & 0 deletions data_structures/binary_trees/2_Inorder_Travesal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Inorder Traversal
## Motivation


# Problem Description
Write a Python program to perform Inoreder Trversal on Bonary Tree.

# Testing
*

## Submission
* Submit your answers in the *solution.py* file within the *Solutions* subdirectory within this directory
Loading