![]() |
About The Challenge: Job-A-Thon 14 Hiring ChallengeThis challenge was organized by the GFG Weekly Coding Contest. Job-a-Thon. On 21 Oct 2022 8:00 PM to 21 Oct 2022 10:30 PM. There are 18 questions and a total of 175 marks. This contest consists of 4 parts:
The ranking was based on the following:
Link of The Contest: https://practice.horje.org/contest/job-a-thon-14-hiring-challenge OVERVIEW OF CHALLENGE:QUIZ Section: In the Programming Logic section, there are 5 mcq questions. The difficulty level was easy to medium. The questions are mainly based on Time complexity. The logical section was medium-level. Questions were like, finding the number of series patterns and the last section was Quantitative Aptitude, which was medium to herd level. CODING PROBLEM:
Problem 1: Geek left with No FoodApproach: First declare a variable time to 0 to keep track of the number of iterations. Enter a while loop that continues as long as n is non-zero. and Inside the loop: If n is even (n % 2 == 0), divide n by 2 (n = n / 2). If n is odd, subtract half of (n + 1) from n (n = n – ((n + 1) / 2)). Increment the time variable by 1 with each iteration. At the end return time. Time complexity: O(log n) Problem 2: Make array EqualApproach: To solve this questions, we need to perform a series of operations on the given array A[] to make all elements equal. Each operation involves selecting a subarray A[L…r], finding the smallest positive integer x in that subarray, and then reducing all elements in the subarray modulo x. we are allowed to perform at most 40 such operations. Time complexity: O( n) Problem 3: Target Path SumApproach: In this question we need to find the minimum cost of modifying the root of a tree-like structure with n nodes. It considers various condition. Keeping the root value unchanged and calculates the cost (curans) based on conditions involving k, a, and b. Changing the root value to the minimum value in the array (mnless) and again calculates the cost. Changing the root value to 0 and calculates the cost. The code iterates through the tree nodes, considering different cases to minimize the cost for each scenario. It finally returns the minimum cost among all these scenarios. Time complexity: O( n) Conclusion:At the end in coding section I solve 2 problem out of 3 problem. The questions was not to difficult. I got 120 mark out of 185. All the best for upcoming contest Challenge. |
Reffered: https://www.geeksforgeeks.org
Contest Experiences |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 13 |