Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
854d6af
1 array
UdhaikumarMohan Jan 11, 2019
43497b3
array from user
UdhaikumarMohan Jan 13, 2019
a875f0e
while loop
UdhaikumarMohan Jan 15, 2019
de3d7a4
new
UdhaikumarMohan Jan 24, 2019
1d37a65
change
UdhaikumarMohan Jan 24, 2019
582528e
length of array
UdhaikumarMohan Jan 25, 2019
d4b4d31
Second problem
UdhaikumarMohan Jan 25, 2019
5b30e84
Second problem
UdhaikumarMohan Jan 25, 2019
ec1a18d
Third problem
UdhaikumarMohan Jan 27, 2019
adc6a08
Third problem
UdhaikumarMohan Jan 27, 2019
0094060
Third Problem
UdhaikumarMohan Jan 27, 2019
6f35af1
4th and 5th
UdhaikumarMohan Jan 30, 2019
e063019
5th
UdhaikumarMohan Jan 31, 2019
137a9e4
5thproblem
UdhaikumarMohan Jan 31, 2019
4e79215
6thproblem
UdhaikumarMohan Jan 31, 2019
b170a3d
7,8,10,11
UdhaikumarMohan Feb 4, 2019
33bdae9
12,13
UdhaikumarMohan Feb 4, 2019
32ad79e
smallest
UdhaikumarMohan Feb 4, 2019
0a8f154
test corrected
UdhaikumarMohan Feb 5, 2019
60ffdc4
Mode
UdhaikumarMohan Feb 6, 2019
288d54e
Two more added
UdhaikumarMohan Feb 9, 2019
6b90e81
updated
UdhaikumarMohan Feb 16, 2019
b689aaa
Rotation completed
UdhaikumarMohan Feb 21, 2019
76a54fc
revised rotation
UdhaikumarMohan Feb 26, 2019
9e8bb10
duplicates
UdhaikumarMohan Mar 12, 2019
31c05b0
subset problems
UdhaikumarMohan May 6, 2019
c616bba
check
UdhaikumarMohan May 6, 2019
b84f5b3
check
UdhaikumarMohan May 6, 2019
9beb472
change
UdhaikumarMohan May 7, 2019
71ff739
min and max
UdhaikumarMohan May 14, 2019
682cb3e
restore
UdhaikumarMohan Jul 25, 2019
7e8a69f
check
UdhaikumarMohan Jul 25, 2019
97240c9
....
UdhaikumarMohan Mar 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .pytest_cache/v/cache/lastfailed
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"Mode/test_Mode.py": true
}
76 changes: 76 additions & 0 deletions .pytest_cache/v/cache/nodeids
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[
"Copy of Array/test_copy.py::test_canassertTrue",
"Copy of Array/test_copy.py::test_copy",
"Count Repeated/test_count_repeated.py::test_canassertTrue",
"Count Repeated/test_count_repeated.py::test_count_repeated",
"Count Repeated/test_greater_count.py::test_canassertTrue",
"Count Repeated/test_greater_count.py::test_Greater",
"Count Repeated/test_lesser_count.py::test_canassertTrue",
"Count Repeated/test_lesser_count.py::test_Lesser",
"Duplicates/test_remove_duplicates.py::test_canassertTrue",
"Duplicates/test_remove_duplicates.py::test_duplicates",
"Identical/test_identical.py::test_canassertTrue",
"Identical/test_identical.py::test_identical_array",
"Index and Value/test_dictionary.py::test_canassertTrue",
"Index and Value/test_dictionary.py::test_dictionary",
"Lengthofarray/test_lengthofarray.py::test_canassertTrue",
"Lengthofarray/test_lengthofarray.py::test_len_of_array",
"Mean/test_mean.py::test_canassertTrue",
"Mean/test_mean.py::test_mean",
"Min and Max/test_Pallindrome.py::test_canassertTrue",
"Min and Max/test_Pallindrome.py::test_pallindrome",
"Multiple Integers/test_repeated.py::test_canassertTrue",
"Multiple Integers/test_repeated.py::test_isRepeated",
"Numbers/test_even_numbers.py::test_canassertTrue",
"Numbers/test_even_numbers.py::test_even_numbers",
"Numbers/test_odd_numbers.py::test_canassertTrue",
"Numbers/test_odd_numbers.py::test_odd_numbers",
"Numbers/test_prime.py::test_canassertTrue",
"Numbers/test_prime.py::test_prime",
"Numbers/test_square.py::test_canassertTrue",
"Numbers/test_square.py::test_square",
"Reverse of Array/test_reverse.py::test_canassertTrue",
"Reverse of Array/test_reverse.py::test_reverse",
"Rotation/test_I_index.py::test_canassertTrue",
"Rotation/test_I_index.py::test_Right",
"Rotation/test_I_index.py::test_Left",
"Rotation/test_K_rotations.py::test_canasssertTrue",
"Rotation/test_K_rotations.py::test_rotate_right",
"Rotation/test_K_rotations.py::test_rotate_left",
"Rotation/test_index.py::test_canassertTrue",
"Rotation/test_index.py::test_right_index",
"Rotation/test_index.py::test_left_index",
"Rotation/test_one_left.py::test_canassertTrue",
"Rotation/test_one_left.py::test_one_left",
"Rotation/test_one_right.py::test_canassertTrue",
"Rotation/test_one_right.py::test_one_right",
"Rotation/test_two_right.py::test_canassertTrue",
"Rotation/test_two_right.py::test_two_right",
"Same Array/test_same_array.py::test_canassertTrue",
"Same Array/test_same_array.py::test_Is_same",
"Smallest and Largest in Array/test_Kth_Largest.py::test_canassertTrue",
"Smallest and Largest in Array/test_Kth_Largest.py::test_Largest",
"Smallest and Largest in Array/test_Kth_Smallest.py::test_canassertTrue",
"Smallest and Largest in Array/test_Kth_Smallest.py::test_Smallest",
"Smallest and Largest in Array/test_Largest.py::test_canassertTrue",
"Smallest and Largest in Array/test_Largest.py::test_Largest",
"Smallest and Largest in Array/test_Smallest.py::test_canassertTrue",
"Smallest and Largest in Array/test_Smallest.py::test_Smallest",
"Smallest and Largest in Array/test_count.py::test_canassertTrue",
"Smallest and Largest in Array/test_count.py::test_smallest",
"Smallest and Largest in Array/test_count.py::test_largest",
"Smallest and Largest in Array/test_second_comparison.py::test_canassertTrue",
"Smallest and Largest in Array/test_second_comparison.py::test_Largest_smallest",
"Subset/test_41.py::test_canassertTrue",
"Subset/test_41.py::test_IsExists",
"Subset/test_42.py::test_canassertTrue",
"Subset/test_42.py::test_Subset_Index",
"Subset/test_43.py::test_canassertTrue",
"Subset/test_43.py::test_subset_values",
"Sum_of_Array/test_sum_of_Array.py::test_canassertTrue",
"Sum_of_Array/test_sum_of_Array.py::test_sum_of_array",
"X_in_given_array/test_X_in_array.py::test_canassertTrue",
"X_in_given_array/test_X_in_array.py::test_X_in_array",
"X_index/test_X_index.py::test_canassertTrue",
"X_index/test_X_index.py::test_X_index"
]
1 change: 1 addition & 0 deletions .pytest_cache/v/cache/stepwise
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"python.pythonPath": "C:\\Users\\GRENINJA\\Anaconda3\\python.exe",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.testing.unittestArgs": [
"-v",
"-s",
".",
"-p",
"test*.py"
],
"python.testing.pytestEnabled": true,
"python.testing.nosetestsEnabled": false,
"python.testing.unittestEnabled": false,
"python.testing.pytestArgs": [
"."
]
}
Binary file added Copy of Array/__pycache__/copy.cpython-37.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
25 changes: 25 additions & 0 deletions Copy of Array/copy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Return the copy of the given unsorted array:

def copy(Array):

C=[]
for a in Array:
C.append(a)

return C

#Getting Input from the user:

N=int(input("Enter the number of elements: "))

Array=[]

for a in range(0,N):

Elements=int(input("Enter the Elements in Array: "))

Array.append(Elements)

print("The given Array is", Array)

print("The copy of the given array is", copy(Array))
18 changes: 18 additions & 0 deletions Copy of Array/test_copy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Test case for the copy of the given array:

import copy

def test_canassertTrue():
assert True

def test_copy():

#Arrange
Array=[1,7,2,5,4,9]
expected=[1,7,2,5,4,9]

#Act
actual=copy.copy(Array)

#Assert:
assert expected==actual
30 changes: 30 additions & 0 deletions Count Repeated/Count_Repeated.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Given an unsorted integer array A and an integer value X, return the number of times X is found in A.

def Count_Repeated(Array,X):

count=0
for i in Array:

if i==X:
count+=1

return count


# Getting Input from User:

#N=input("Enter the number of elements: ")

#Array=[]

#for a in range(0,N):

#Elements=input("Enter the Elements in Array: ")

#Array.append(Elements)

#print("The Given array is: " ,Array)

#X=input("Enter the search Elements: ")

#print ("The Index of the given Search elements is: " ,Count_Repeated(Array,X))
Binary file added Count Repeated/Count_Repeated.pyc
Binary file not shown.
32 changes: 32 additions & 0 deletions Count Repeated/Greater_comparision.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Find the count of the values which is greater than or equal to the given integer:

def Is_Greater(Array,Integer):

count=0

for a in Array:

if (a>=Integer):
count+=1

return count

# Getting Input from User:

#N=input("Enter the number of elements: ")

#Array=[]

#for a in range(0,N):

#Elements=input("Enter the Elements in Array: ")

#Array.append(Elements)

#print("The given Array is", Array)

#Integer=input("Enter the integer value: ")

#print("The count is: ",Is_Greater(Array,Integer))


Binary file added Count Repeated/Greater_comparision.pyc
Binary file not shown.
30 changes: 30 additions & 0 deletions Count Repeated/Lesser_comparision.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Find the count of the Integer in the given array and compare the array is less than or equal to the given Integer.

def Is_Lesser(Array,Integer):

count=0

for a in Array:

if (a<=Integer):
count+=1

return count

# Getting Input from User:

#N=input("Enter the number of elements: ")

#Array=[]

#for a in range(0,N):

#Elements=input("Enter the Elements in Array: ")

#Array.append(Elements)

#print("The given Array is", Array)

#Integer=input("Enter the integer value: ")

#print("The count is: ",Is_Lesser(Array,Integer))
Binary file added Count Repeated/Lesser_comparision.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
19 changes: 19 additions & 0 deletions Count Repeated/test_count_repeated.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Test case for the count of repeated numbers:

import Count_Repeated

def test_canassertTrue():
assert True

def test_count_repeated():

#arrange
Array=[5,3,8,0,1,8]
X=8
expected=2

#act
actual=Count_Repeated.Count_Repeated(Array,X)

#assert
assert expected==actual
19 changes: 19 additions & 0 deletions Count Repeated/test_greater_count.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Test case for the greater count:

import Greater_comparision

def test_canassertTrue():
assert True

def test_Greater():

#Arrange:
Array=[2,3,2,2,4,5]
Integer=3
expected=3

#Act:
actual=Greater_comparision.Is_Greater(Array,Integer)

#Assert:
assert expected==actual
19 changes: 19 additions & 0 deletions Count Repeated/test_lesser_count.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Test case for the lesser count:

import Lesser_comparision

def test_canassertTrue():
assert True

def test_Lesser():

#Arrange:
Array=[2,3,2,2,4,5]
Integer=3
expected=4

#Act:
actual=Lesser_comparision.Is_Lesser(Array,Integer)

#Assert:
assert expected==actual
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
27 changes: 27 additions & 0 deletions Duplicates/remove_duplicates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Remove the Duplicates from the given array:

def duplicates(Array):

duplicates_removed=[]

for a in Array:
if a not in duplicates_removed:
duplicates_removed.append(a)

return duplicates_removed

# Getting Input from User:

#N=input("Enter the number of elements: ")

#Array=[]

#for a in range(0,N):

#Elements=input("Enter the Elements in Array: ")

#Array.append(Elements)

#print("The given Array is", Array)

#print("The array without duplicates:", duplicates(Array))
Binary file added Duplicates/remove_duplicates.pyc
Binary file not shown.
18 changes: 18 additions & 0 deletions Duplicates/test_remove_duplicates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Test case for removing duplicates from the given array:

def test_canassertTrue():
assert True

import remove_duplicates

def test_duplicates():

#Arrange:
Array=[5,2,6,2,3,5,6,2]
expected=[5,2,6,3]

#Act:
actual=remove_duplicates.duplicates(Array)

#Assert:
assert expected==actual
Binary file added Identical/__pycache__/identical.cpython-37.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading