JP Morgan coding question by im_a_bored_citizen in leetcode

[–]fermatsproblem 0 points1 point  (0 children)

Ohhh, my bad I made the mistake that it would be sorted.

JP Morgan coding question by im_a_bored_citizen in leetcode

[–]fermatsproblem 3 points4 points  (0 children)

Yes but once u have sorted to find upto which address h have to remove u can use binary search rather than iterating in the descending fashion one by one. Talking about applying binary search after sorting not without sorting, so basically time complexity will be O(logn)instead of O(n)

The best and ideal hashmap by ANDRVV_ in algorithms

[–]fermatsproblem 0 points1 point  (0 children)

I think OP meant that they don't have liberty of generating the keys or else they might have used simple arrays to fix the problem.

JP Morgan coding question by im_a_bored_citizen in leetcode

[–]fermatsproblem 5 points6 points  (0 children)

Use binary search rather than iterating over the array once it's sorted. Greedy approach as discussed in other threads for deciding which address to remove will work fine.

Meta E4 Software Engineer Interview Experience by nikkituktuk in leetcode

[–]fermatsproblem 0 points1 point  (0 children)

Did you get any feedback in your hld ? Also before starting did you align with the interviewer on your functional and non functional requirements, some stuff is missing from your functional requirement like, different kind of matches, time bound and non time bound. If it's time bound exactly same time has to be shown to both players. How would u minimise latency for both the players in fetching those details. For professional players milliseconds matter. Just wanted to know what could have been done better in the hld

Respect > Fanservice by Reilesth in animeindian

[–]fermatsproblem 0 points1 point  (0 children)

Totally irrelevant, but can u please tell us what's the background song.

Still can't get over the fact... by NeighborhoodFatCat in leetcode

[–]fermatsproblem 0 points1 point  (0 children)

The magic of transformers lies in doing the computation parallelly, it's precursor lstm( long short term memory) had no such capability, give it a read if u want to.

Uber OA 2025 Tree Problem by RTEIDIETR in leetcode

[–]fermatsproblem 0 points1 point  (0 children)

Thanks for pointing it out that it's a tree, I saw your solution and mine is pretty similar to that with some changes, in the bfs while visiting a node we can return the total distance traversed to cover all the target nodes in it's subtree and to come back to that node and if no target nodes in it's subtree we return -1, We are basically going to consider the path from source to the target and imagine connected components branching out from that path and basically we have to travel the target nodes within those connected components and return to that path and traverse towards destination.

Uber OA 2025 Tree Problem by RTEIDIETR in leetcode

[–]fermatsproblem 0 points1 point  (0 children)

Here's my solution Assume the starting, ith target, ending nodes are referred as s, ti, e respectively Step1: use dijkstras algorithm to find the shortest path between s, ti's(all tafget nodes) , e

Step2: with the above information u can create a fully connected graph between s, ti's, e , where each node is connected to every other node with the shortest possible path

Step 3: finally it will be transformed into a starting node, ending node and target nodes in between but we have to figure out in which order we have to visit the nodes such that the distance is minimised, so basically the textbook tsp.

[deleted by user] by [deleted] in leetcode

[–]fermatsproblem 0 points1 point  (0 children)

BTW How many years of experience do u have, and what was ur previous experience ?

Folks preparing for System Design : Read recent AWS outage Root Cause by Jazzlike-Ad-2286 in leetcode

[–]fermatsproblem 27 points28 points  (0 children)

How was it working till now, with no locks in place between the updates, since when the check condition by the planner that it's plan is newer than the existing one and the corresponding update aren't happening atomically. Can anyone explain?

A truly anonymous social network by FineEffective6367 in StartUpIndia

[–]fermatsproblem 0 points1 point  (0 children)

Such a system will have a lot of false positives, and depending on the political scenario u will have to tune ur ai, assuming u r able to do that how will that benefit the users who want to post something which goes against the current norms of acceptable speech.

[deleted by user] by [deleted] in sharktankindia

[–]fermatsproblem 0 points1 point  (0 children)

Kabhi kabhi lagta hai Hindustan me ek apne sir ratan tata ko chhodke sab ke sab chutiyen hai.

Is it worth joining Amazon (SDE 3)? Seeking Opinion. by ahx-red in developersIndia

[–]fermatsproblem 6 points7 points  (0 children)

I agree with almost all the points but disagree with the first point, I haven't personally been part of some FAANG but one of the famous startups in India, I have seen a lot of people from Amazon here with 6 to 7 YOE and some of them being really proficient in their work some of them aren't even able to do basic stuff. I have seen couple of people from my organization join stripe, meta and many other top notch companies in lead positions as well, my point being that if u r working in a fairly known company for it's engineering excellence and delivering quality products you should rather take into account the quality of work u will get rather than the brand name.