American Express Hiring Challenge

Hello guys, Today I attended American express hiring challenge and solved 3/3, but there was mentioned as - Candidates from this list of colleges are eligible to participate in the challenge and will be considered for hiring
Is there any chance I can still receive mail regarding selection.

2 Likes

The Shortlising criteria for interns is allotted to only those eligible colleges.

1 Like

Can you tell me the approach or share the code for the second question of the contest?
Thanks in advance!!

I think questions were different for everyone, can you tell me which question?

Can anyone explain me how to do Candy love question? :slight_smile:

@py_js Can you please share the approach for Candy Love problem …??

Questions in my set -

  1. Find the value
  2. Xor-Sum
  3. its was something like find cost to reach nth floor

Can anyone provide problem statement of Candy Love problem …??

can you share code of Xor-sum?

It’s a DP problem similar to assembly line scheduling.
Here we can observe that to maximize the answer, we either have to select 1 or max available candy.

Hope it helps.!

1 Like


Similar problem

can you please share the code how you solved find the value problem !!

1 Like

@py_js Please share the approach/Code for Find the value problem

1 Like

It is basically the standard problem of inversion count in an array.using merge sort algorithm

The approach is to use inversion count using merge sort algorithm if you looked carefully at the question.

Basically on careful observation you would have find that the required value is nothing but the first bit having 0 or free bit in the binary representation of the given number it will be easy to calculate then that number in decimal.

Thanks a lot :slight_smile:

thanks @anon31329220 :slight_smile:

did any one solved graph problem then please share your idea .
Thanks is advance!