Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Code 360 contest
lightning-red
Rated
Weekly Contest 120
+12741 other showed interest
Contest ended
( IST)
Your rating & Leaderboard
Discussion
Video SolutionNew
Contest details
Rewards
Rules & FAQs
Login to view weekly contest rating
Weekly contest rating
Contest attended
Problems solved
2021 2024
Better than %
Contest leaderboard rules
EXP-Based Ranking:
Your leaderboard rank is influenced by your total EXP, which you accumulate by solving each question. The more EXP you gather, the higher your rank ascends.
Tie-Breaker Rule:
Should there be a tie in total EXP among participants, precedence is granted to the one who reached their total EXP first. This ensures a fair and competitive ranking.
Time Calculation:
The duration for accumulating EXP is measured from the contest's official start time. This ensures uniformity, as it does not depend on each participant’s start time.
Discussion
Go to discussion page
profile
Codestudio
Weekly Contest 120
Contests and hackathons
views
4020
views
chat
6
replies
upvote
0
upvotes

Hey Ninjas!

This is a post to ask doubts and share your logic for solving questions from Weekly Contest 120! 😄
You can also view the rankings for the contest here (link).

If you face any issues during the contest, do let us know by replying below. ✌️

How was your experience in the contest or got any feedback? Let us know here (link)

upvote
0 Upvoted
Published on 4 Apr, 2024
Replies (6)
profile
Hrithik Kumar
5 Apr, 2024

Correct solution code for 2nd question. bool kDifferent(string &s, int k){

    // Write your code here.

    int n=s.length();

    int mf=0;

    vector<int> freq(26);

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

        freq[s[i]-'a']++;

        mf=max(mf,freq[s[i]-'a']);

    }

    if(mf>(n+k-1)/k){

        return 0;

    }

    if(mf<(n+k-1)/k){

        return 1;

    }

    int cnt=0;

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

        if(freq[i]==mf){

            cnt++;

        }

    }

    int md=n%k==0?k:n%k;

    if(cnt>md){

        return 0;

    }

    return 1;

}

 

chat
0
replies
upvote
1
upvotes
reply
Reply
profile
Shudhanshu Kumar
4 Apr, 2024
int mod 1000000007;
// Write your code here.
long long countGoodNumbers (long long n, long long m){
	long long rem=m/9;
	rem=((rem*10)%mod+9)%mod;
	if (rem>n) return 0;
	return (rem*1LL*(n-rem))%mod;
}

 

all sample test cases passed but giving wrong output somewhere…..anyone plz check what's wrong in this solution for the hard one.

chat
1
replies
upvote
1
upvotes
reply
Reply
profile
Mayukh Roy
4 Apr, 2024

yeha bhi chini logo ne invade kar dia

chat
0
replies
upvote
1
upvotes
reply
Reply
profile
Kulpreet Singh
4 Apr, 2024

binary search use kar

chat
0
replies
upvote
upvotes
reply
Reply
profile
Prakhar
4 Apr, 2024

sahi bola bro

chat
0
replies
upvote
upvotes
reply
Reply
Video solution
Contest details

CN Insider💡- Be the First to Know – Join our Brand new Discord Community of CNCode 360 for Insider tips, Early Announcements, and Structured Upskilling.

 

Embark on a weekly coding adventure with problems inspired by industry giants like D.E Shaw and Microsoft ! 💡!! Each week brings a new opportunity for you to showcase your coding skills and a chance to land tech internships or full-time positions with our esteemed hiring partners.

 

Weekly Contest 120 is not just about coding; it's a chance to upskill, get hired, and step into the world of enormous career opportunities.



WC 120 Hiring Partners and Exciting Opportunities:

 

1. Black Currant Labs : Full Time Interview Opportunity ( Freshers Role )

 

Role: Full Stack Developer

CTC: 6 - 8 LPA

Eligibility: Grad Year 2023 & Below

 

 

Contest Process(Important):

Registration: Register on CNCode 360 Weekly Contest to participate in the contest

Participation: Engage in the coding challenge every Thursday from 8 to 10 PM.

Criteria: Aim to be among the top 50 percentile and score high to stand out and get a chance to become eligible to receive placement screening form for further procedure ( Graduation year eligibility is mentioned with every offered role in the above section)

Selection Criteria : Our hiring partners select candidates for further screening rounds based on their contest rating, percentile and roles relevant skill based resumes.

Note:
Hiring Opportunities offered with this contest are subjected to participants performance and their

eligibility fulfilling the prerequisit criteria of offered roles (which can be their graduation year, work experience etc).

 

Contest Format:

Duration: 2 hours of coding excitement.

Problems: 4 High Quality Industry Based Coding Problems.

Language Supported: Java,Python, C++,&JavaScript



Contest Solution: Weekend Contest 120 Video Solution is now available in the Video Solution Section of the contest and CN Youtube Channel, stay tuned !!

Sample problem for you
Rewards

Weekly Contest Rewards 🏆

Rank 1 - 3 :
M240 Mouse

Rank 4 - CN T-shirt


Earn Coding Ninjas Studio EXP as well to unlock lucrative badges on your CNStudio Profile

  • 1st - 1000 EXP
  • 2nd - 750 EXP
  • 3rd - 500 EXP
  • 4th-10th - 250 EXP
  • 11th-50th - 100 EXP
  • First Contest - 200 EXP
  • Participation - 100 EXP
Rules
  • You can submit solutions as many times as you'd like, there are no penalties for incorrect submissions. Only your best correct submission will be considered.
  • Those who achieve the score first will be placed higher in the ranklist in case of a tie.
  • Discussing Coding Ninjas Studio contest problems or any aspect of the problem, on any other platform on the web, on identification, could lead to disabling of respective account and banning from the community.
  • Please do not discuss strategy, suggestions, or tips in the comments during a live contest. Posting questions clarifying the problem statement is ok. If you are unsure, feel free email us at support@codingninjas.com
  • The problems will be partially graded. You will get score for passing certain test cases.
  • Facing any kind of issues, email us at support@codingninjas.com
For any issues and inquiries mail us at
support@codingninjas.com
FAQs
Which browser should I prefer to use to participate in contests?
What kind of questions can I expect in Coding Ninjas Studio contests?
Can I leave the test in the middle and continue later?
What if i encounter technical issues during the test?
What is the meaning of EXP?
Can we participate in contests from mobile?
Will I receive the results of the contest? If yes, when?
Will I get the allotted time to attempt the contest if I start the contest just few mins before the event End Time?
How are hiring opportunities integrated into the contest?
What is the timeline for filling the resume details form?
Can I find eligibility criteria for specific hiring partners?
How can I inquire about a specific hiring partner or contest details?