Open In App

Contest Experiences | Geeksforgeeks: Bi-Wizard School Coding Tournament 16.0

Last Updated : 16 Oct, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

GeeksforGeeks Bi-Wizard School Coding Tournament 16.0

This was a contest organized on the Geeks for Geeks platform on June 26th, 2023 and it consisted of 3 coding questions and 20 multiple-choice questions which were to be solved in a time frame of 90 minutes from 6:00 PM to 7:30 PM.

Note: This coding contest was exclusively for school students.

Prizes/Offers:

There was no prize as such for the contest but this coding contest would help blossom our coding journey in the following factors :

  • Skill Development.
  • Competitive Spirit.
  • Learning from Peers.

Link of the Contest:Geeksforgeeks: Bi-Wizard School Coding Tournament 16.0

Overview of the questions asked :

Problem Name

Difficulty Level

Time to Solve

Pre-requisites

Number of Submissions made by me

Bitwise AND Challenge

Easy-Medium

15 minutes

Bitwise operations.

1

Geek loves Coding

Easy

10 minutes

Iteration using while loop.

2 (1 WA)

Add Binary Strings Without Leading Zeroes

Medium

20 minutes

Binary addition.

1

Coding Questions:

Problem 1: Bitwise AND Challenge

These problem was designed to test our knowledge about bitwise operations where we have to find if there exists a non-empty subsequence such that the bitwise AND of all the elements in the subsequence is a fixed value x (given as input).

In this question we have to iterate over the array and take only those elements whose bitwise representation has bit set at all the positions where there is a set bit in x.

Now, by taking the bitwise AND of all such numbers that satisfy the above condition and then at last we have to check if the bitwise AND calculated if that is equal to x, then it is possible to find a subarray whose bitwise AND is x otherwise we cannot.

Problem 2: Geek loves Coding

In this problem we have to find the longest streak of geek where geek solves a problem each day and the status is represented as a string. String contains three type of characters ‘A’, ‘W’ and ‘N’, where A represents accepted, W represents wrong and N represents Not solved.

Now, we have to find the longest streak of geek along with the effective day in the longest streak. A longest streak is represented as the maximum number of consecutive days where geek solved a problem(either ‘A’ or ‘W’) and effective days are the number of ‘A’ in the longest streak.

I used a while loop to solve this problem, where I ran a while loop starting from the first index till we encounter a ‘N’ and count the number of ‘A’ and length of the subarray. Then, for each subarray I took the maximum consecutive days and for subarrays with same number of consecutive days I took the subarray with maximum effective days.
I got one Wrong Answer(WA) in this problem due to silly mistake in code syntax.

Problem 3: Add Binary Strings Without Leading Zeroes

In this problem we have to add two binary strings (without leading zeroes). This is a very traditional problem of adding bitwise numbers which we can do taking carry bits.
I was able to solve this problem in one go, but it was an implementation problem which required intense thinking and avoiding silly mistakes. Since, I got one WA in 2nd problem so this time I was extra careful while implementing.

0 + 0 = 0

0 + 1 = 1

1 + 0 = 1

1 + 1 = 0 ( carry = 1)

Quiz:

All the multiple choice questions were based on computer science fundamentals which required basic knowledge of Database Management Systems, Object Oriented Programming, Sorting techniques, etc. Each MCQ had 5 marks and I was able to get 17 out of 20 MCQ’s correct.

Conclusion:

Overall, I would rate this contest on a medium side as there were two questions(2nd and 3rd) which were just implementation based and the one question(1st) which was a bitwise operation based.
I was able to solve all the questions within the time frame of 90 minutes. You can watch the post contest analysis for further understanding here.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads