Shri Guru Gobind Singhji Institute of Engineering and Technology, Nanded 2024
Java - Default language
My Stats
EXP gained
16595
Level
7 (Expert)
Community stats
Discussions
0
8
Know more
565
Total problems solved
520
Easy
41
Moderate
4
Hard
0
Ninja

Current streak:

14 days

Longest streak:

29 days

Less

More

Achievements
4
Ronin
Topics
Strings
Greedy
+ 2 more
2
Samurai
Topics
Arrays

1 Time topper

Shri Guru Gobind Singhji Institute of Engineering and Technology, Nanded

291 average partcipants
Discussions
Java Solution Easy
Careers and placements

public class Solution {

public static int ninjaAndTriangle(int n) {

// Write your code here.

int i=0,level=0;

while(n>=i){

i++;

n -= i;

if(n>=0){

level++;

}else return level;

}

return level;

}

}

Pavan8010
Published On 25-Aug-2023
36 views
0 replies
Java Solution Easy
Careers and placements

public class Solution {

public static int ninjaAndTriangle(int n) {

// Write your code here.

int i=0,level=0;

while(n>=i){

i++;

n -= i;

if(n>=0){

level++;

}else return level;

}

return level;

}

}

Pavan8010
Published On 25-Aug-2023
36 views
0 replies
Java Simple One Line Solution
Careers and placements

public class Solution {

public static int toggleKBits(int n,int k) {

return (n ^ ((1<<k)-1));

}

}

Pavan8010
Published On 24-Aug-2023
62 views
0 replies
Java Simple One Line Solution
Careers and placements

public class Solution {

public static int toggleKBits(int n,int k) {

return (n ^ ((1<<k)-1));

}

}

Pavan8010
Published On 24-Aug-2023
62 views
0 replies
Java Easy Solution using PriorityQueue🔥🔥
Careers and placements

import java.util.* ;

import java.io.*;

public class Solution {

public static ArrayList<Integer> findMinMax(int a, int b) {

// Write your code here

PriorityQueue<Integer> pq= new PriorityQueue<>();

ArrayList<Integer> ans = new ArrayList<>();

return ans;

}

}

Pavan8010
Published On 22-Aug-2023
103 views
1 replies
Java Easy Solution using PriorityQueue🔥🔥
Careers and placements

import java.util.* ;

import java.io.*;

public class Solution {

public static ArrayList<Integer> findMinMax(int a, int b) {

// Write your code here

PriorityQueue<Integer> pq= new PriorityQueue<>();

ArrayList<Integer> ans = new ArrayList<>();