About Me

About Me : I have been working as a Software Engineer for various international companies for four years.Currently, I am working as a full stack Javascript developer in Petronas(Malaysia).

Skills

Skills • Javascript •Typescript •Python •C •Java •ReactJs • Redux • VueJs • NestJs • React Testing Library • Django• PostgreSQL • MySQL • NodeJs • Git • Docker • Jira • Visual Studio Code • Slack

শনিবার, ২৬ নভেম্বর, ২০১৬

UVA 441 using python

#   MH RIYAD
#   Daffodil Intl. Univarsity
import functools

printf = functools.partial(print, end="")
lis = list()
li = list()
vec = list()
a = 0
flag = False


def call( n ):
 
    if len(vec)==6:
        for i in range (0,6):
            if i == 0:
                printf(vec[i])
            else:
                printf("",vec[i])
        print("")
        return
  
    if n>=a:
        return
    vec.append(lis[n])
    call(n+1)
    vec.pop()
    call(n+1)
   
       
if __name__ == "__main__":
   
    while True:
   
       
        li = list(map(int ,input().split()))
        a = li[0]
        if a==0:
            break
        if flag == True:
            print("\n")
        flag = True
       
        for i in range(1,len(li)):
            lis.append(li[i])
        #print(lis," ",a)
       
        call(0)
        del lis[:]
        del vec[:]
        del li[:]

বুধবার, ২ নভেম্বর, ২০১৬

Selection Sort in python


Time Complexity:O(n*n)
a=[5,4,3,2,1]

for i in range(0,4):
    x=i
    for j in range(i+1,5):
       
        if (a[x]>a[j]):
            x=j
           
    temp=a[i]
    a[i]=a[x]
    a[x]=temp

           
       
print(a)