News for hackers. Stuff that matters.
Re:“I was just asked to balance a Binary Search Tree by JFK'... by areyousure on Monday February 27, 2017 @01:37AM (#13742349)
As an additional data point, in 2000, both a fellow traveler and I were asked mathematical questions by US immigration officers in Canada. He answered correctly, I was unable to do so, but we were both allowed to enter without further investigation. I thought the experience was fine.

I have had less pleasant, aggressive questioning dealing with British immigration when flying into Heathrow as well as Irish immigration when flying out of Heathrow, though in the latter case the proximal cause was my fellow traveler choosing to lie. :(

Re:“I was just asked to balance a Binary Search Tree by JFK'... by microtherion on Monday February 27, 2017 @10:55AM (#13745097)
> He answered correctly, I was unable to do so, but we were both allowed to enter without further investigation.

It's like that cliché often employed in coding interviews, but immigration officers are more serious about it: They don't need a correct answer, they are interested primarily in observing your answering process.

Re:“I was just asked to balance a Binary Search Tree by JFK'... by huxley on Tuesday February 28, 2017 @08:10PM (#13760030)
It may be a bit dated nowadays, but from travelling through Central America back in the 80s, I made it a habit to never ever use the phrase "fellow traveler" around US border officials:

https://en.wikipedia.org/wiki/Fellow_traveller

Re:“I was just asked to balance a Binary Search Tree by JFK'... by areyousure on Tuesday February 28, 2017 @10:01PM (#13760602)
Thanks for the reference! I didn't know about that euphemism.
Re:“I was just asked to balance a Binary Search Tree by JFK'... by TomMarius on Monday February 27, 2017 @02:54AM (#13742636)
Ah, the good old prisoner's dilemma.