Skip to content

Commit

Permalink
Add DSA problems
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddharthaMishra-dev committed Feb 2, 2023
1 parent f43a838 commit 5bda955
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions insertionsort.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
arr=[10,4,5,11,9,8,6]
n=len(arr)
for i in range(n):
temp=arr[i]
j=i-1
while j>=0 and arr[j]>temp:
arr[j+1]=arr[j]
j-=1
arr[j+1]=temp

print(arr)
7 changes: 7 additions & 0 deletions removeduplicates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
s="aabbbcd"
temp=""
for i in s:
if i not in temp:
temp+=i

print(temp)

0 comments on commit 5bda955

Please sign in to comment.