Hacker Newsnew | past | comments | ask | show | jobs | submit | pyfan878's commentslogin

This is an excellent description of the mood that we are going through right now. It does feel inevitable that AI is going to be part of our life, whether we like or not.


hogged to death :/


I'm a backend engineer and my professional interests lie in backend development, distributed systems, cloud computing, and building data-intensive applications. I enjoy tackling complex technical challenges and designing scalable solutions that can handle large amounts of data efficiently.

Location: UK

Remote: Prefer Remote and Hybrid

Willing to relocate: Yes

Technologies: Backend, data pipelines, Python, Java, Scala, some Typescript, Kubernetes, Kafka, Postgres, GCP, AWS

Résumé/CV: https://blog.ammar.blue/about/

Email: ammarali121x AT gmail.com


I'd add cut off browsing news/reddit and scrolling social media. It also overload the brain with garbage.


Sometimes, it's a way to elegantly solve some problems. Imagine you have a binary tree and you need to find it's depth. The answer is the maximum depth of its left and right subtree plus one. This easily translates into a recursive code.

It's true that it's rarely used in production quality code, but nonetheless it's sometimes useful and you should have a good command of writing recursive code.


I'm more increasingly convinced that ceo are capitalizing on this occasion to lay off people they deem undesirable.


right, there's no way that tech companies laying off people means fewer seats sold for other software providers


Very nice! I really find it useful. Would you mind sharing the tech stack?


Thanks for sharing! will check it out later, but this looks great.


It's useful for the estimation part of system design.


This pretty standard interview question. You should keep track of the current minimum when you do a push: push 1: [(v=1,m=1)] push -1: [(v=1, m=1), (v=-1, m=-1)] push 3: [(v=1, m=1), (v=-1, m=-1), (v=3, m=-1)] get_min: [(v=1, m=1), (v=-1, m=-1), (v=3, m=-1)] returns m=-1 pop: [(v=1, m=1), (v=-1, m=-1)] returns v=3 get_min: returns -1


Came here to say this, as far as LC questions go, this one is pretty straight forward. OP, the way you come up with a solution like this is practice and more practice, the same way you can solve an equation you never seen before, because you have a set of tools (patterns, "tricks", knowledge, ...) that allows you to come up with a solution. Keep practicing and you will see the progress.


OP meant O(1) in time and space (forgot the space but it’s in the linked article). That solution is O(N) in space.


problem is when you pop the min, you can't know which was the second to min unless you do the trick that's in the website quoted.


You don't pop the min, you pop the top of the stack.


Yes. Of course. But what do you do when the top of the stack IS the min? Your new min should change, but you won't have the information to update to the second min unless you do the trick in the article.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: