Shri Shankaracharya Institute Of Professional Management And Technology, Raipur 2025
My Stats
EXP gained
29274
Level
7 (Expert)
Community stats
Discussions
1
19
Know more
Weekend contest rating
Contest attended
Problems solved
2021 2023
Better than %
Weekend contest rating
Contest attended
Problems solved
2021 2023
Better than %
199
Total problems solved
139
Easy
57
Moderate
2
Hard
1
Ninja

Current streak:

0 days

Longest streak:

10 days

Less

More

Achievements
6
Ronin
Topics
Stacks & Queues
Strings
+ 4 more
1
Samurai
Topics
Arrays

1 Time topper

Shri Shankaracharya Institute Of Professional Management And Technology, Raipur

633 average partcipants
Discussions
Longest Successive Element 100%
Interview problems

int longestSuccessiveElements(vector<int>&a) {

sort(a.begin(),a.end());

int count=0,maxi = 0;

for(int i=1;i<a.size();i++){

while(a[i]-a[i-1]==1||a[i]-a[i-1]==0){

(a[i]-a[i-1]!=0)?count++:1;

i++;

}

maxi = max(maxi,count);

count=0;

}

return maxi+1;

}

Lackykannauje1
Published On 30-Nov-2023
38 views
2 replies
Easy(POTD)
Interview problems

#include <bits/stdc++.h>

bool splitString(string &str){

int n = str.size();

int count=0;

// char arr[]={'A','E','I','O','U','a','e','i','o','u'};

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

if(str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U'||str[i]=='a'||str[i]=='e'||str[i]=='i'||str[i]=='o'||str[i]=='u'){

count++;

}

int j=n-i-1;

if(str[j]=='A'||str[j]=='E'||str[j]=='I'||str[j]=='O'||str[j]=='U'||str[j]=='a'||str[j]=='e'||str[j]=='i'||str[j]=='o'||str[j]=='u'){

count--;

}

}

return count==0?true:false;

}

Lackykannauje1
Published On 28-Oct-2023
31 views
0 replies
Easy(POTD)
Interview problems

#include <bits/stdc++.h>

bool splitString(string &str){

int n = str.size();

int count=0;

// char arr[]={'A','E','I','O','U','a','e','i','o','u'};

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

if(str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U'||str[i]=='a'||str[i]=='e'||str[i]=='i'||str[i]=='o'||str[i]=='u'){

count++;

}

int j=n-i-1;

if(str[j]=='A'||str[j]=='E'||str[j]=='I'||str[j]=='O'||str[j]=='U'||str[j]=='a'||str[j]=='e'||str[j]=='i'||str[j]=='o'||str[j]=='u'){

count--;

}

}

return count==0?true:false;

}

Lackykannauje1
Published On 28-Oct-2023
31 views
0 replies
Today's POTD (moderate)
Interview problems

/****************************************************************

Following is the class structure of the Node class:

class Node

{

public:

int data;

Node *next;

Node()

{

this->data = 0;

next = NULL;

}

Node(int data)

{

this->data = data;

this->next = NULL;

}

Node(int data, Node* next)

{

this->data = data;

this->next = next;

}

};

*****************************************************************/

{

while(fast&&fast->next){

slow=slow->next;

fast=fast->next->next;

if(slow==fast){

goto found;

}

}

return NULL;

found:

if(slow==fast){

return slow;

}

while(slow->next!=fast->next){

slow=slow->next;

fast=fast->next;

}

return slow->next;

}

Lackykannauje1
Published On 09-Sep-2023
27 views
0 replies
Today's POTD (moderate)
Interview problems

/****************************************************************

Following is the class structure of the Node class:

class Node

{

public:

int data;

Node *next;

Node()

{

this->data = 0;

next = NULL;

}

Node(int data)

{

this->data = data;

this->next = NULL;

}

Node(int data, Node* next)

{

this->data = data;

this->next = next;

}

};

*****************************************************************/

{

while(fast&&fast->next){

slow=slow->next;

fast=fast->next->next;

if(slow==fast){

goto found;

}

}

return NULL;

found:

if(slow==fast){

return slow;

}

while(slow->next!=fast->next){

slow=slow->next;

fast=fast->next;

}

return slow->next;

}

Lackykannauje1
Published On 09-Sep-2023
27 views
0 replies
Moderate POTD
Interview problems

int minimumDifference(int n, vector<int> arr)

{

int sum=0;

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

sum+=arr[i];

}

int s=0,min=INT_MAX,diff;

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

s+=arr[i];

sum-=arr[i];

diff=abs(sum-s);

if(diff<min){

min=diff;

}

}

return min;

}

Lackykannauje1
Published On 24-Aug-2023
33 views
0 replies
Moderate POTD
Interview problems

int minimumDifference(int n, vector<int> arr)

{

int sum=0;

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

sum+=arr[i];

}

int s=0,min=INT_MAX,diff;

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

s+=arr[i];

sum-=arr[i];

diff=abs(sum-s);

if(diff<min){

min=diff;

}

}

return min;

}

Lackykannauje1
Published On 24-Aug-2023
33 views
0 replies
Easy potd
Interview problems

void insert(Node * ( & head), int n, int pos, int val) {

Node * node = new Node(val);

if(pos==0){

return;

}

for(int i=1;i<pos;i++){

temp = temp->next;

}

node->next=temp->next;

temp->next=node;

return;

}

Lackykannauje1
Published On 15-Aug-2023
63 views
0 replies
Easy potd
Interview problems

void insert(Node * ( & head), int n, int pos, int val) {

Node * node = new Node(val);

if(pos==0){

return;

}

for(int i=1;i<pos;i++){

temp = temp->next;

}

node->next=temp->next;

temp->next=node;

return;

}

Lackykannauje1
Published On 15-Aug-2023
63 views
0 replies
Easy Potd
Interview problems

#include <bits/stdc++.h>

int findSetBit(int N) {

int count=0,x=0;

while(N>0){

if(N%2==1){

count++;

}

x++;

N/=2;

}

if(count!=1){

return -1;

}

return x;

}

Lackykannauje1
Published On 11-Aug-2023
64 views
0 replies