Update appNew update is available. Click here to update.
About
" B.Tech 2023 graduate from IIT Dhanbad with a strong foundation in Engineering and a passion for Data Science/Machine learning and Software Engineering. Eager to contribute and learn in a dynamic Da...
Indian Institute of Technology Indian School of Mines, Dhanbad 2023
My Stats
EXP gained
yellow-spark
3176
Level
5 (Champion)
Community stats
Discussions
0
Upvotes
0
Know more
Weekend contest rating
Contest attended
Problems solved
2021 2023
Better than %
Weekend contest rating
Contest attended
Problems solved
2021 2023
Better than %
58
Total problems solved
49
Easy
8
Moderate
1
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:

3 days

Less

More

Achievements
Discussions
very easy solution
Interview problems

#include <bits/stdc++.h> 

void sort012(int *arr, int n)

{

   int z=0,o=0,t=0;

   for(int i=0;i<n;i++){

      if(arr[i]==0) z+=1;

      if(arr[i]==1) o+=1;

      if(arr[i]==2) t+=1;

   }

   //cout<<z<<o<<t<<endl;

   for(int i=0;i<z;i++){

      arr[i]=0;

   }

 

   for(int i=z;i<o+z;i++){

      arr[i]=1;

   }

   for(int i=o+z;i<t+z+o;i++){

      arr[i]=2;

   }

}

profile
Akash Singh
Published On 04-Aug-2023
54 views
0 replies
0 upvotes
very easy C++ solution
Interview problems

#include <bits/stdc++.h>  string encode(string &message) {    int n=message.size();    int count=1;    string s;    for(int i=0;i<n;i++){        if(message[i+1]!=message[i]){            s.push_back(message[i]);            s+=to_string(count);            count=0;        }        count+=1;    }    return s; }

profile
Akash Singh
Published On 01-Aug-2023
119 views
0 replies
0 upvotes