Jump to content
BrainDen.com - Brain Teasers
  • 0

Logic problem for HR recruiting at a big software company


catcher_silviu
 Share

Question

3 answers to this question

Recommended Posts

  • 0

first we analyze the cases:


a) 6 → 1;
b) 32 → 01;
c) 53 → 00;
d) 172 → 101;
e) 276 → 101;
f) 314793 → 110011;
g) 52735 → xxxxx


encodings are below and reference the case(s) above which encodes the digit
digit 1 -> 1 (d)
digit 2 -> 1, 1, 1 (b,d,e)
digit 3 -> 0, 0, 1+1* (b,c,f*)
digit 4 -> 0 (f)
digit 5 -> 0 ©
digit 6 -> 1, 1 (a,e)
digit 7 -> 0, 0, 0 (d,e,f)
digit 8 -> none
digit 9 -> 1 (f)

*Only 3 has a strange encoding
3 occurs twice in the number
3 is the first and last digit of the number

So using the basic encoding for each digit:

digit 5 -> 0 ©
digit 2 -> 1, 1, 1 (b,d,e)
digit 7 -> 0, 0, 0 (d,e,f)
digit 3 -> 0, 0, 1+1* (b,c,f*)
digit 5 -> 0 ©

52735 -> 01000


But then 5 may have to be "flipped" like 3 was in f) because
5 occurs twice in the number
5 is the first and last digit of the number

So:
52735 -> 11001
Link to comment
Share on other sites

  • 0

Are you sure the conversion for the 6 digit number is correct?

For the reasoning that I find compatible for all the numbers (except this one), it should be 100011

The last digit is 1 if it is even or if there is an even occurrence of an odd number; otherwise 0.


The next digits to the left are 0 if the digit to the immediate right is smaller and 1 if it is larger. This logic gets inverted if the last digit is odd and occurs even number of times (the 6 digit number case)
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...