Welcome to my channel! 🌟
Here, I share unfiltered takes on political, global, trending, and social issues 🌍πŸ”₯β€”sparking thought-provoking discussions that matter. Later, I dive into my passion for coding and technology πŸ’»βœ¨, exploring the latest trends, sharing coding hacks, and much more. Subscribe for a unique mix of insights, opinions, and creativity! πŸš€πŸ’‘


Aman Baluni

Why is domestic violence against men by women not recognized as a crime in India?

7 months ago | [YT] | 0

Aman Baluni

Today's Leetcode Problem of the Day (POTD) is 633 - Sum of Square Numbers

There are multiple approaches to solving this question. This is the basic maths question, so I won't be posting any video for this.

Let's discuss three approaches -

1st - TC = O(c)
bool judgeSquareSum(int c) {
for(ll a=0; a*a<=c; a++){
for(ll b=0; b*b<=c; b++){
if(a*a + b*b == c){
return true;
}
}
}
return false;
}

2nd - TC = O(sqrt(c * log(c)))
bool judgeSquareSum(int c) {
for(ll a=0; a*a<=c; a++){
double b = sqrt(c - a*a);
if(b == int(b)) return true;
}
return false;
}

3rd - TC = O(sqrt(c))
bool judgeSquareSum(int c) {
ll a = 0;
ll b = sqrt(c);

while(a <= b) {
ll sum = a*a + b*b;

if(sum < c) {
a++;
} else if (sum > c) {
b--;
} else { //sum == c
return true;
}
}
return false;
}

1 year ago | [YT] | 1

Aman Baluni

Today's Leetcode Problem of the Day (POTD) is 344 - Reverse String.

The question is quite simple, so I won't be creating a video for it. However, in case you need it, I have provided the explanation below:

You just need to write a function that reverses a string. You can use two pointers for this. Let's call them "start" and "end". Set "start" at index 0 and "end" at the last index. This is similar to what we do in a palindrome question. Then, use a loop while "start" is less than "end" and keep swapping s[start] and s[end]. While doing this, increment "start" and decrement "end".

void reverseString(vector<char>& s) {
int st=0;
int e = s.size()-1;

while(st<e) {
swap(s[st++], s[e--]);
}
}

1 year ago (edited) | [YT] | 0

Aman Baluni

What does the acronym 'SQL' stand for in programming?

2 years ago | [YT] | 1

Aman Baluni

What was the initial name of Java language?

2 years ago | [YT] | 2