Contest Experiences | Job-A-Thon 14 Hiring Challenge

About The Challenge: Job-A-Thon 14 Hiring Challenge

This 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:

  • 3 DSA Coding problem – 100 Marks
  • 5 MCQ on Programming logic – 25 Marks
  • 5 MCQ on Logical Reasoning – 25 Marks
  • 5 MCQ on Quantitative Aptitude – 25 Marks

The ranking was based on the following:

  • Maximum score
  • Less time
  • 5% penalty for each wrong submission.

Link of The Contest: https://practice.w3wiki.net/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 Name

Difficulty

Max Marks

Approx. time taken by me

Number of Submissions by me

Geek left with No Food

Easy

20

8

1

Make array Equal

Medium

35

10

1

Target Path Sum

Hard

45

Problem 1: Geek left with No Food

Approach: 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)
Space complexity: O(1)

Problem 2: Make array Equal

Approach: 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)
Space complexity: O(1)

Problem 3: Target Path Sum

Approach: 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)
Space complexity: O(1)

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.