silver and black imac s
An ultimate introduction to binary tree

BLOG CREDITS THANMAI KOGATAM

Binary Tree:
● Non-linear data structure
● Maximum of two children for each parent
● Stores information in a hierarchical manner

Applications:
● Data compression
● Preparing binary heaps and binary search trees


Basic Terminologies of Binary tree (Numbering of nodes is based on above
picture):
● Root – top most node [1]
● Parent – node directly above something (3 is the parent of 6 and 7)
● Child – node directly under an element(4 and 5 are children of 2)
● Leaf Nodes – nodes with no left and right children (8,5,6,7)
● Internal Nodes -all nodes expect leaves (1,2,3,4)
● Height of a tree – no. of edges from root to the deepest leaf.(Here
height is 3)
Basic Structure of the Binary tree node:
1. Data
2. Pointer to left child
3. Pointer to right child


Code snippet of Node class(C++) :
Node{
int data;
Node* left;
Node* right;
public:
// constructor to initialize a node of value = val
Node(int val)
{
data = val;
left = right = NULL;
}

black and gray laptop computer turned on doing computer codes
KNOW MORE ABOUT STRINGS

String
A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable in Computer Programming Language.A string is generally considered as a data type and is often implemented as an array data structure of bytes that stores a sequence of elements, typically characters, using some character encoding.

— String is used to manipulate text such as word or sentences.
–The difference between a character array and a string is the string is terminated with a special character ‘\0’.

Declaration of strings: Declaring a string is as simple as declaring a one-dimensional array.
Ex : char str_name[size]

Initializing a String: A string can be initialized in different ways.
1. char str[] = “RAISEACAD NITK”;
2. char str[50] = “RAISEACAD NITK”;
3. char str[] = {‘R’,’A’,’I’,’S’,’E’,’A’,’C’,’A’,’D’,’ ‘,’N’,’I’,’T’,’K’,’\0′};
4. char str[14] = {‘R’,’A’,’I’,’S’,’E’,’A’,’C’,’A’,’D’,’ ‘,’N’,’I’,’T’,’K’,’\0′};

grayscale photography of chessboard game
Embrace the coffee and accept the cup.

CREDITS MANTHAN MOHITE NITK

How dare you beat me in chess, you big foreheaded, small chimpanzee. Who are you?” these were the words of my class x  bully Mr. Abc while he kicked me right on my back. I was dragged to the ground with full force. Well, if you are wondering if his shoe was clean I had the same question.
Greetings, honorable professor and my fellow coffee cups. this was the incident that shaped, or to be honest, reshaped my school life. I was very underconfident in my childhood, insecure about every possible human trait. I was short, had a big forehead, and was arguably good at nothing except academics(which was not cool anyway). While the whole class was laughing that day I was lying on the floor thinking about the biggest question of the millennium,” Who am I?” this question might not make sense but at that moment it felt relevant.” Although i had been bullied all through my childhood, that day it really hit me, the whole class was laughing and I thought they were right I don’t have anything special. Have you ever felt you are not good enough, I felt exactly like that, my self-esteem was buried alive? I was insecure about everything was fairly underconfident. For a few days, I didn’t want to do anything.
I went home and was still thinking of what had happened that day, and to be fair I was blaming myself for being like this. Every moment i was thinking about my insecurities, it went to an extent that i was denying my success in academics. Academics for me was like a fight.
Round one 10th board bang 95.2%, 12th standard shoot 90.15%, jee dash 99th percentile.
Football team selection (take a pause) bang you are not tall enough, go home kid. Shuss. This sentence was a just a small joke but when you are insecure about something it really gets on your mind and it did. And again everyone started pointing me out and laughing at me for something I wasn’t responsible for. All the success meant nothing in front of this.
Again that day i went home crying imagine a 17 year old crying, ya i know it was awful. That day was worse than the last time. In the evening my grandpa called me for a cup of coffee, he got to know what happened. After going there i see 4 cups of coffee, i sat next to him as he starts speaking. What do you see here, i said 4 cups of coffee, he said chose one, i chose the best looking one. Well the taste wasn’t good enough. And then what he said changed everything. He said son life is like these coffee cups the cups are provided to you like your body and situations, and its not in your control how your cup is. The looks of the cup are not the deciding factor for the taste of coffee, in the same way the way we are and what we are given is something which is not in our control and won’t control what we can do. The current world just gets lost in the cup and forgets to embrace the coffee. The moment you stop judging and worrying about the cup you are given and start embracing the coffee everything will change. So all my fellow coffee cups lets start embracing the coffee and accept the cup as it was given.

colorful bowling balls on a return system
THE PIGEON HOLE PRINCIPLE

BLOG CREDITS VIVEK FIRST-YEAR CSE

:-Statement:-If we put more than n pigeons into n pigeonholes, at least one pigeonhole will house two or more pigeons.Form1:-If m objects are put in n boxes and n < m, then at least one box contains at least two objects. The one-line proof is by contradiction: If every box contains at most one object, there are at most n · 1 = n objects. A more rigorous formulation of the principle is as follows: Given two sets A and B, with |A| = m > n = |B|, for any function, f : A → B there exists b ∈ B such that |{x ∈ A: f(x) = b}| > 1.Form 2:-For a nonempty finite collection of integers (not necessarily distinct), the maximum value is at least the average value.Form:-3 If m objects are put in n boxes, then at least one box contains at least ¢[m/n] objects. The proof is again by contradiction: If every box contains at most ¢[m/n] − 1 < m/n objects, there are less than n(m/n) = m objects.(Where ¢[k] is ceiling function of k)Example:- A bag contains 5 red, 8 blue, 12 green, and 7 yellow marbles. The least number of marbles to be chosen to ensure that there are

(a) at least 4 marbles of the same color are 13

(b) at least 7 marbles of the same color is 24,

(c) at least 4 red or at least 7 of any other color is 22.

greyscale photography of car engine
ELECTRIC MOTOR AND IT’S APPLICATIONS


‘Electric’ means one which works on electrical energy.’Motor’ one that imparts motion. So motor which converts applied electrical energy to mechanical energy. It is rotating device
which results into rotation of rotor on application electric field.
🔌 Electric motor mainly consists of rotor, bearings, windings, commutator.
🔌Electric motor works on the principle of magnetic effects of applied electric current. It works on combine effect of electric and magnetic field.
🔌The magnetic field in electric motor is produced using windings in motor.
🔌The driving force in electric motor is torque produced due to applied electric energy.
🔌Electric motors can be classified into two main types:-
1)AC motors:- works on alternating(AC) current.
2)DC motors:- works on direct(DC) current.
🔌 Applications of electric motors:-
As it is device which converts electrical energy to magnetic energy it has many application in household as well as industrial purposes. Also electric motors are more environmental friendly as they do not cause any pollution.
1)Electric motor in household devices:- Electric motor is used in vaccum cleaners, fans,dishwashers, computer printers etc.
2)Electric motor for industrial purposes:- Electric motors used in paper mills, crushers, rolling mills,turbines etc.