Week-1

Berjin SujithBerjin Sujith
2 min read

What I have Learned in this week

  • Binary Search

  • Bubble Sort

  • Java Script - variables , conditionals , loops,

Why binary Search is Useful ?

Binary Search takes less time than linear Search to find the Target

How Binary Search is performed ?

  1. start

  2. end

  3. while( condition )

  4. mid

  5. if(condition)

    start = mid + 1;

  6. else if(condition)

    end = mid - 1;

  7. else

    return ans;

Why Bubble Sort is Useful ?

Bubble sort is used to sort an array step by step in ascending or descending order

How Bubble Sort Will Be Performed ?

  1. The outer loop should run n-1 times

  2. The inner loop should start from 1 and run n-1-i times

  3. j want to check with j-1 if j-1 is smaller than j then swap j → j-1 , j ← j-1

Difficulties I Gone Through…

I Understand the concept easily But when I try to code i stuck in some places like

  • At Beginning I would give my looping condition Wrongly

  • I fail Every time to think the correct logic to get right output

  • Sometimes my values go above the index bound

How I Overcame From This

  • I watch the tutorial again and again until I get my answer from his coding

  • Then I used Chat Gpt to debug the code I have written and ask it to explain me by that also I learned Something

Tools I used

  • You Tube

  • Chat Gpt

  • Qwen

References

For Java DSA

  • You Tube Kunal Kushwaha video

Bubble Sort

Binary Search

For Java-Script

  • You Tube

    Error Makes Clever

    Code io

0
Subscribe to my newsletter

Read articles from Berjin Sujith directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Berjin Sujith
Berjin Sujith