Wex Inc | Software Engineer 2 Interview Experience

wex inc logo
wex inc
Software Engineer 2Ongoing
September 23, 202549 reads

Summary

I recently interviewed for a Software Engineer 2 position at Wex Inc, which involved a detailed Data Structures and Algorithms round.

Full Experience

My interview process for the Software Engineer 2 role at Wex Inc began with a dedicated Data Structures and Algorithms round. I was presented with two distinct coding challenges that tested my problem-solving abilities.

Interview Questions (2)

Q1
Water Jug Problem
Data Structures & AlgorithmsMedium

The classic Water Jug Problem, also known as LeetCode problem 365. You are given two jugs with capacities jug1Capacity and jug2Capacity liters. There is also an infinite supply of water. You need to determine whether it is possible to measure exactly targetCapacity liters using these two jugs.

Q2
Maximum Elements Equal with K Updates
Data Structures & AlgorithmsMedium

Given an array nums[] and a value k. The task is to find the maximum elements that can be made equal with at most k updates/increments.

Examples:
Input : nums[] = { 2, 4, 9 }, k = 3
Output : 2
We are allowed to do at most three increments. We can make two elements 4 by increasing 2 by 2. Note that we can not make two elements 9 as converting 4 to 9 requires 5 increments.

Input : nums[] = { 5, 5, 3, 1 }, k = 5
Output : 3
Explanation: Here 1st and 2nd elements are equal. Then we can increase 3rd element 3 upto 5. Then k becomes (k-2) = 3. Now we can’t increase 1 to 5 because k value is 3 and we need 4 for the updation. Thus equal elements possible are 3. Here we can also increase 1 to 5. Then also we have 3 because we can’t update 3 to 5.

Input : nums[] = { 5, 5, 3, 1 }, k = 6
Output : 4

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!