| ▲ | ojr 5 days ago |
| I just did a phone screen with Meta, and the interviewer asked for Euclidean distance between two points; they definitely have some nerds in the building. |
|
| ▲ | karmakurtisaani 5 days ago | parent | next [-] |
| That's like 8th grade math, what am misunderstanding about your comment? E: wasn't the only one. |
| |
| ▲ | ojr 5 days ago | parent [-] | | K closest points using Euclidean distance and a heap, is not 8th grade math, although any 8th grade math problem can be transformed into a difficult "adult" question. Sums are elementary, asking to find a window of prefix sums that add up to something is still addition, but a little more tricky |
|
|
| ▲ | jaccola 5 days ago | parent | prev | next [-] |
| People saying it is a high school maths problem! I'd like to see you provide a general method for accurately measuring the distance between two arbitrary points in space... |
| |
| ▲ | ojr 5 days ago | parent | next [-] | | Using a heap in 10 minutes, the Euclidean distance formula was given and had to be used in the answer; maybe they thought that was the question? | |
| ▲ | butlike 5 days ago | parent | prev [-] | | Compare to the speed of light, c at your two reference frames |
|
|
| ▲ | rogerkirkness 5 days ago | parent | prev | next [-] |
| They actually need to know so that they can train Llama. |
|
| ▲ | A_D_E_P_T 5 days ago | parent | prev | next [-] |
| I suppose the trick is to have an ipad running GPT-voice-mode off to the side, next to your monitor. Instruct it to answer every question it overhears. This way you'll ace all of the "humiliation ritual" questions. |
| |
| ▲ | ojr 5 days ago | parent [-] | | there's a youtube channel made by a meta engineer, he said to memorize the top 75 LeetCode Meta questions and approaches. He doesn't say fluff like "recognize patterns. My interviewer was 3.88/4 GPA masters Comp Sci guy from Penn, I asked for feedback he said always be studying its useful if you want a career... |
|
|
| ▲ | ojr 5 days ago | parent | prev | next [-] |
| it wasn't just euclidean distance of course, it was this leetcode problem k closest points to origin https://leetcode.com/problems/k-closest-points-to-origin/des..., I thought if I needed a heap I would have to implement it myself didn't know I can use a library |
| |
| ▲ | nijave 5 days ago | parent [-] | | I.e. the nearest neighbor problem. Presumably seeing if the candidate gave a naive solution and was able to optimize or find a more ideal solution | | |
| ▲ | ojr 5 days ago | parent [-] | | its not a nearest neighbor problem that is incorrect, they expect candidates to have the heap solution on the first go, you have 10-15 minutes to answer, no time to optimize, cheaters get blacklisted, welcome to the new reality | | |
| ▲ | esafak 5 days ago | parent | next [-] | | Finding the k points closest to the origin (or any other point) is obviously the k-nearest neighbors problem. What algorithm and data structure you use does not change that. https://en.wikipedia.org/wiki/Nearest_neighbor_search edit: If you want to use a heap, the general solution is to define an appropriate cost function; e.g., the p-norm distance to a reference point. Use a union type with the distance (for the heap's comparisons) and the point itself. | | |
| ▲ | ojr 5 days ago | parent [-] | | true, I am thinking, Node and neighbors, this is a heap problem, it actually does matter what algorithm you use, I learn that the hard way today, trying to implement quickselect vs using a heap library (I didn't know you could do that) is much easier, don't make the same mistake! |
| |
| ▲ | butlike 5 days ago | parent | prev [-] | | Wish it was more how you think than requiring boolean correct/incorrect answer on the whiteboard after 15min. |
|
|
|
|
| ▲ | andrepd 5 days ago | parent | prev | next [-] |
| I don't get the joke. |
| |
| ▲ | ojr 5 days ago | parent [-] | | no joke, stop pretending like you know the answer to every LeetCode question that utilizes Euclidean distance |
|
|
| ▲ | dist-epoch 5 days ago | parent | prev [-] |
| That's basic high school math problem. |
| |
| ▲ | ojr 5 days ago | parent [-] | | The foundation, like every LeetCode problem, is a basic high school math problem, when the foundation of the problem is trigonometry, way harder than stack, arrays, linked list, bfs, dfs... |
|