Posts

My Life

  I'm the laziest person on this universe. Never miss a chance to be on a AC or professional environment. Find time and Bath everyday morning. Wear only shoes to colleges. I could only think clear when i'm alone. I always tried to stay away from others and be alone. I blamed my neck and shoulder pain as a reason for my fate. It was very hard for me to take the first step . I get a flow if i started but it wont be consistent. I felt like learning with curiosity to deeper extends and outside of the syllabus with interest was too hard for me to do since years after my tenth. I dont remember how i was before that.  I was all alone after my sister's marriage. I was wanted a purpose to do something like deadline usually the day just before exams. I always tried to to search for that purpose to begin something. I believed i would only start if there's a purpose like "Necessity is the mother of invention." My words and promises were too high that i couldnt keep them. ...

Sorting Algorithms

Bubble Sort: Works by repeatedly swapping the adjacent elements if they are in the wrong order.  Not suitable for large data sets. In this algorithm,  traverse from left and compare adjacent elements and the higher one is placed at right side.  In this way, the largest element is moved to the rightmost end at first.  This process is then continued to find the second largest and place it and so on until the data is sorted. def bubbleSort(arr):      n = len (arr)             # Traverse through all array elements      for i in range (n-1):          swapped = False            # Last i elements are already in place          for j in range ( 0 , n - i - 1 ):                # Traverse the array fr...