Tekion Corp Software Engineer 2 Backend

tekion logo
tekion
Software Engineer 2 Backend4.5 years
May 9, 202513 reads

Summary

I interviewed for a Software Engineer 2 Backend position at Tekion Corp. I was given two LeetCode problems and managed to solve one of them. Unfortunately, I was rejected after the interview.

Interview Questions (2)

Q1
Minimum Equal Sum of Two Arrays After Replacing Zeros
Data Structures & AlgorithmsMedium

You are given two arrays nums1 and nums2 consisting of non-negative integers. You have to choose an integer x and replace all occurrences of 0 in nums1 with x, and replace all occurrences of 0 in nums2 with x. After these replacements, the sum of elements in nums1 and nums2 must be equal. Return the minimum possible equal sum. If it's not possible to make the sums equal, return -1.

Q2
Minimum Cost to Make Array Equal
Data Structures & AlgorithmsHard

You are given two 0-indexed arrays nums and cost of length n each. You can change any element of nums to any integer x. The cost of changing nums[i] to x is |nums[i] - x| * cost[i]. Return the minimum total cost such that all elements of nums become equal.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!