Thread regarding Qualcomm Inc. layoffs

Come on Qualcomm American folks complaining about Indians. Write some code now

Looks like the competitive coding world is too much for some American folks to handle. In coding competitions, Russians, Chinese and some good Americans are just brilliant.

But for the not so good American coder in Qualcomm who wants Indians to leave America for his JOB, lets see you solve this

https://www.hackerrank.com/challenges/permutation-game/submissions

Take 2 weeks :)

by
| 466 views | | 5 replies (last ) | Reply
Post ID: @OP+DiKHA0p

5 replies (most recent on top)

The chinese this, russians that, blah blah blah. You my good sir are a f***ing moron. Now, go code that.

by
| | Reply
Post ID: @27zk+DiKHA0p

Test Case #0: 0.09s Test Case #1: 2.97s Test Case #2: 1.68s Test Case #3: 2.46s Test Case #4: 2.87s Test Case #5: 2.56s Test Case #6: 1.81s Test Case #7: 1.88s Test Case #8: 2.39s Test Case #9: 1.87s

I wont do your job white trash ... First write the code yourself

Find the passed test cases above.

Solve it guys. Keep the adrenaline going.

by
| | Reply
Post ID: @qxn+DiKHA0p

Why so angry?

by
| | Reply
Post ID: @Y7r+DiKHA0p

Wait ... may be you are still confused .... let me give you the problem itself knucklehead ....

Problem Statement

Alice and Bob play the following game:

They choose a permutation of the first N numbers to begin with.

They play alternately and Alice plays first.

In a turn, they can remove any one remaining number from the permutation.

The game ends when the remaining numbers form an increasing sequence. The person who played the last turn (after which the sequence becomes increasing) wins the game.

Assuming both play optimally, who wins the game?

Input:

The first line contains the number of test cases T. T test cases follow. Each case contains an integer N on the first line, followed by a permutation of the integers 1..N on the second line.

Output:

Output T lines, one for each test case, containing "Alice" if Alice wins the game and "Bob" otherwise.

Constraints:

1 <= T <= 100

2 <= N <= 15

The permutation will not be an increasing sequence initially.

Sample Input:

2

3

1 3 2

5

5 3 2 1 4

Sample Output:

Alice

Bob

Explanation:

For the first example, Alice can remove the 3 or the 2 to make the sequence increasing and wins the game.

For the second example, if 4 is removed then the only way to have an increasing sequence is to only have 1 number left, which would take a total of 4 moves, thus allowing Bob to win. On the first move if Alice removes the 4, it will take 3 more moves to create an increasing sequence thus Bob wins. If Alice does not remove the 4, then Bob can remove it on his next turn since Alice can not win in one move.

by
| | Reply
Post ID: @MQx+DiKHA0p

This is the problem .. just in case you didnt know how to click a tab ...

https://www.hackerrank.com/challenges/permutation-game

by
| | Reply
Post ID: @ubA+DiKHA0p

Post a reply

: