Picture Book by Ms. Neha Taneja (AP, CSE)

It is basically a visual representation in the form of images, illustrations and block diagrams displayed for the purpose of visualizing the concepts in real-life applications. This presents before the students a better way to understand the concept thoroughly. This creates enthusiasm among them as they can visualize the usage of the concept taught in class.

For example, a Sorting topic taught in class this way:

Bubble Sort

Bubble sort is a sorting algorithm that compares two adjacent elements and swaps them until they are in the intended order.

Have a look at the analogy of Bubble Sort :

As in this case, it compares the former and the latter and as we can see the swap is needed to sort them as per height, the required swap is made and it is SORTED.

Let us look at step by step working of Bubble Sort Algorithm

Suppose this set of Unicorns are given to us and we have to sort them using Bubble Sort.

Now, let us see how Bubble Sort algorithm works.

The sorting begins the first iteration by comparing the first two values. If the first value is greater than the second, the algorithm pushes the first value to the index of the second value.

First Iteration of the Sorting

Step 1: Compare Unicorn at position 0 with Unicorn at position 1.

As we can see they are already sorted so no swap is required.

Step 2: Compare Unicorn at position 1 with Unicorn at position 2.

As we can see they are already sorted so no swap is required.

Step 3: Compare Unicorn at position 2 with Unicorn at position 3.

Clearly, a swap is required. So, swap it.

Now at the end of First Iteration, it looks like this:

Second Iteration of the Sorting 

 

Step 1: Compare Unicorn at position 0 with Unicorn at position 1.

As we can see they are already sorted so no swap is required.

Step 2: Compare Unicorn at position 1 with Unicorn at position 2.

Clearly, a swap is required. So, swap it. And now it looks like this:

So, now last two positions are sorted after the second iteration.

Third Iteration of the Sorting 

Step 1: Compare Unicorn at position 0 with Unicorn at position 1.

Clearly, a swap is required. So, swap it.

And now it looks like this:

And it is SORTED

I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Pigeonhole Principle by Mr. Ankur Gupta (AP, CSE)

Q: How do we prove that a Language L is not Regular

A: Prove that there is no DFA that accepts L

Problem: It can be difficult to prove this

Solution: The Pumping Lemma!

2 Comments

  1. Pooja Bansal August 8, 2023
  2. Vishali August 8, 2023

Leave a Reply