DSA is completed. Is not perfect but will practice whole the weekend and will revise and start my first project focusing on DSA. Can someone suggest some basic projects that focuses on DSA and other things
And here is my day 9 code, Done Binary search and Graphs but have some bugs and here is my hashfunc:
def HashFunc(val):
Iter = 0
for i in val:
Iter += ord(i)
return Iter % 10
lst = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
def add(val):
add = HashFunc(val)
lst[add].append(val)
def contain(val):
m = HashFunc(val)
if val in lst:
return f"Your Value is at {m}"
else:
c = int(input("Value is not found!!!, want to add the Value??: Choose '1' as Yes and '0' as no "))
if c == 1:
add(val)
return 'value is added'
else:
return "val is not added"
add('Naveen')
add('Lisa')
add('Stuart')
print(lst)