Update appNew update is available. Click here to update.
About
A Remote Software Developer From Asia/India.
Thakur College of Engineering and Technology 2024
My Stats
EXP gained
yellow-spark
5997
Level
6 (Specialist)
Community stats
Discussions
1
Upvotes
1
Know more
173
Total problems solved
151
Easy
20
Moderate
2
Hard
0
Ninja
Jan Jan Feb Feb Mar Mar Apr Apr May May Jun Jun Jul Jul Aug Aug Sep Sep Oct Oct Nov Nov Dec Dec

Current streak:

0 days

Longest streak:

6 days

Less

More

Achievements
2
Ronin
Topics
Arrays
Sorting
Discussions
C++ Soln || Easy TO Understand
Interview problems

Time Complexity: O(N)

 

#include <bits/stdc++.h> 
int largestElement(vector<int> &arr, int n) {
    // Write your code here.
    int maxi = INT_MIN;
    for(int i=0;i<n;i++){
        if(arr[i]>maxi)
            maxi = arr[i];
    }
    return maxi;
}
profile
rapid_killer_9
Published On 02-Nov-2023
84 views
0 replies
0 upvotes
C++ Easy To Understand Soln
Interview problems
vector<int> countFrequency(int n, int x, vector<int> &nums){
    // Write your code here.
    vector<int> ans(n);
    for(int i=0;i<nums.size();i++){
        ans[nums[i]-1]++;
    }
    return ans;
}
profile
rapid_killer_9
Published On 01-Nov-2023
555 views
3 replies
2 upvotes
Easy To understand C++ Soln
Interview problems
long long fact(long long x){
    if(x==1) return 1;
    return x*fact(x-1);
}

vector<long long> factorialNumbers(long long n) {
    // Write Your Code Here
    vector<long long> ans;
    long long x;
    for(long long i=1;i<=n;i++){
        x=fact(i);
        if(x>n)
            return ans;
        else
            ans.push_back(x);
    }
}
profile
rapid_killer_9
Published On 29-Oct-2023
480 views
0 replies
3 upvotes