Question 1
There are n people at a party. Some of them are friends and others are strangers.
A person naturally moves to create or join a group containing friends and friends of friends. A friend group is defined as a group of people among which each person is a friend to at least one other person.
Assuming a person is not a friend of anyone outside their group, return the total number of friend groups that may form at the party.
You are given an n x n matrix isFriend where isFriend[i][j] = 1 if the ith and the jth person are friends, and isFriend[i][j] = 0 if they are strangers.
Question 2
Given an array of integers arr and an integer k, find the least number of unique integers after removing exactly k elements.
The count of unique (non-duplicate) integers remaining in the final array is minimum.
Example
Input: arr = [4,3,1,1,3,3,2], k = 3
Output: 2
Question 3
Implement a calculator that takes strings as inputs and operations. It should perform +, -, *, /.
The output should be a string. The system is memory constrained and cannot handle more than one digit at a time.
Cannot do int("100000000000000000000000") + int("7000000000000000000000000").
These problems cover classic interview fundamentals: counting friend groups as connected components in a graph using DFS, BFS, or Union-Find; minimizing the number of unique integers after exactly k removals with a frequency map and greedy sorting by count; and building a memory-friendly string calculator by simulating arithmetic instead of converting huge values directly.