![]() |
VOOZH | about |
Participating in coding competitions not only tests your problem-solving skills but also provides a platform for research and development. My recent experience in the "Code Frenzy 1.0" contest, organized by the coding club of my university, "GeeksUnited," inspired by "GeeksForGeeks," was nothing short of exhilarating. This article takes you through the journey of Code Frenzy, including an overview of the contest, the challenges encountered, the solutions explored, and the valuable lessons learned along the way.
Since it was our first offline contest in the college (for the freshers), the prizes were not that much but still, they were captivating:
"Code Frenzy" was conducted in two rounds, each consisting of three challenging problems. To proceed to the second round and become eligible for certificates, participants had to score at least 50% in the first round. Exciting prizes awaited the top three performers.
The contest was hosted on "HackerRank," a popular platform for coding competitions and challenges. Participants, including myself, were required to have a "HackerRank" account to participate.
The first round aimed to assess basic coding skills. It comprised three problems, each from different areas: Arrays, Strings, and Pointers.
Problem Name | Description |
|---|---|
The Array Sum Game | Find the sum of all elements in an integer array |
String Reversal | Reverse a given string without using built-in functions |
Pointer Puzzler | Manipulate pointer variables and perform specific operations |
Participants were given an array of integers and tasked with finding the sum of all its elements.
To solve this problem, I wrote a simple loop to iterate through the array and calculate the sum of its elements.
This challenge required reversing a given string without using built-in reverse functions.
I tackled this problem by creating a new string and iterating through the characters of the original string in reverse order, appending each character to the new string.
The third problem delved into pointers, requiring participants to manipulate pointer variables and perform specific operations.
For this problem, I used pointer arithmetic to perform the required operations on the given pointers. The actual solution varied based on the specific operations and constraints provided.
I successfully solved all three problems, ensuring that I crossed the 50% threshold required to advance to the second round.
The second round of Code Frenzy was considerably more challenging, putting participants' problem-solving skills to the test. Just like in the first round, three questions were presented, but this time, the complexity increased significantly.
Problem Name | Description |
|---|---|
The K-Diff Subarray | Find the maximum subarray of length K with minimal difference between the maximum and minimum elements. |
String Manipulation Maze | Transform one string into another using a series of character and substring operations. |
Pointer Labyrinth | Navigate a maze-like data structure through complex pointer manipulation to extract specific information. |
Participants had to find the maximum subarray of length K in an array, ensuring the difference between the maximum and minimum elements within the subarray was minimal.
This problem required a more advanced algorithm. I implemented a sliding window approach to efficiently find the maximum subarray. I moved a window of length K through the array, keeping track of the maximum and minimum values within the window.
In this complex string problem, participants were tasked with transforming one string into another using a series of operations involving character and substring swapping.
To solve this problem, I started with the first string and applied a series of operations to transform it into the second string. I used a loop to iterate through the characters of both strings concurrently, swapping characters when necessary until the two strings matched.
Building upon the concepts introduced in the first round, this problem required complex pointer manipulation to traverse a maze-like data structure and extract specific information.
The solution to this problem depended on the unique structure and rules provided in the competition. It often involved a combination of pointer manipulation and conditional statements to navigate and extract data from the structure.
While I made progress on these challenges, I did not secure a prize-winning position. Nevertheless, the learning experience was invaluable.
Participating in "Code Frenzy" was a journey filled with challenges and learning opportunities. It reinforced the importance of not only mastering the fundamentals but also continuously pushing oneself to tackle more complex problems. The contest's challenging questions provided a glimpse into the kind of challenges that advanced coders might encounter, expanding my knowledge and problem-solving skills.
While I didn't win a prize, the experience and knowledge gained from Code Frenzy were worth their weight in gold. It's not always about winning but about the journey of growth and development that coding competitions offer. I'm now more motivated than ever to continue honing my coding skills and participating in future contests.
(Note: As it was an offline contest, there is no link provided.)