third year student at VIT CHENNAI with a keen interest in problem solving and web development.
Coding Ninjas - Teaching Assistant
Vellore Institute of Technology - VIT Chennai 2025
My Stats
EXP gained
12065
Level
7 (Expert)
Community stats
Discussions
1
0
Know more
233
Total problems solved
138
Easy
83
Moderate
12
Hard
0
Ninja

Current streak:

0 days

Longest streak:

11 days

Less

More

Achievements
3
Ronin
Topics
Stacks & Queues
Sorting
+ 1 more
3
Samurai
Topics
Arrays
Strings
+ 1 more
Discussions
Easy c++ solution || beginner friendly
Interview problems

void findKthLargest(Node* root, int k, int& count, int& kthLargest) {

if (root == NULL) {

return;

}

findKthLargest(root->right, k, count, kthLargest);

count++;

if (count == k) {

kthLargest = root->data;

return;

}

findKthLargest(root->left, k, count, kthLargest);

}

int KthLargest(Node* root, int k) {

int count = 0;

int kthLargest = -1;

findKthLargest(root, k, count, kthLargest);

return kthLargest;

}

Abhishek_Kumar
Published On 26-Jun-2023
83 views
0 replies
this will work
Interview problems

int NthRoot(int n, int m) {

// Write your code here.

double root = pow(m, 1.0 / n);

if (abs(root - round(root)) < 1e-9) {

return round(root);

} else {

return -1;

}

}

Abhishek_Kumar
Published On 28-Apr-2023
589 views
0 replies