Yash's Site

Imported Archive


Binary Heaps

yash101

Today, we will discuss a binary heaps, a common data structure in programming.
Heaps have multiple uses in programming including:

Priority Queues : a queue-like data structure which has a priority field as a key. In a priority queue implemented with a min-heap, the element with the lowest value for priority will the next available element. In a priority queue implemented with a max-heap, the element with the highest value for priority will be the next available element.

Finding the k’th [small/larg]est element : Heaps are really good at solving this problem, because after creating a heap from the target elements, the lowest (min-heap implementation) or the highest (max-heap implementation) values can be extracted with ease.

Read Article 📖👉🏼

Artificial Finger

yash101

I was thinking, how do we determine what we are touching when we aren’t
looking at our fingers? I realized that our nerve endings are very sensitive
and can feel some of the lightest vibration. It also dawned on me that perhaps

Read Article 📖👉🏼