🧪Formula List
Basic
Prevent iterator from moving forward in for loop.
for loop.char ch;
for(int i = 1; i <= 10; i++) {
cout << "Iteration " << i << endl;
cout << "repeat iteration (y/n): ";
cin >> ch;
if(ch == 'y')
i--;
}Array
Binary Search
Getting Mid while Avoids Integer Overflow
Math
Problem
Approach
GCD Euclid's Formula
Fast Exponentiation
Compare Numbers Represented as String
Removing Leading 0s from a Number in String
Compare double type numbers
Check whether a double type contains Integer
Property of nCr
Property of nPr
Power of two
Bit Manipulation
Check if bit is set
Set a bit
Multiply by 2^k
Check if a number is odd or even
String
Problem
Approach
Linked List
Edge Cases
Case
Problem
Handling
Get Length of a Linked List
Get nth Node from Front
Get the Last Node of a Linked List
Reverse a Linked List
Get the Middle Element of a Linked List
To get 5 as the middle element in event elements
Binary Tree
Iterative Traversal Algorithm
Inorder Traversal
Last updated