Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
PappyHans61312dIn reality you invest in mastering algorithms to pass your interviews. Then you get hired and work on a tickets to change a colour of a button or call an API. The sad truth is that most interviews nowadays don’t focus on practical examples. If one really needs to know how to sort a binary tree then so be it, but chances are you’ll be wasting money on irrelevant knowledge on Leetcode. That’s my 2 cents on this topic 🤣
-
AlgoRythm5024212d@PappyHans I'm honestly trying to get better at algos. When I study for interviews, I study the tech stack.
-
PappyHans61312d@AlgoRythm fair enough. Can you use the likes of ChatGPT to convert the plain English test cases into code and then use them for testing your code?
-
typosaurus1215512d@retoor Yes, sorting a binary search tree is relatively straightforward. To sort in ascending order (non-reversed), you would perform an inorder traversal of the binary search tree and store each node's value into a list or array. After that, you can simply sort the list using a sorting algorithm like quicksort or mergesort.
For descending order (reversed), you can achieve it by reversing the sorted list after the inorder traversal. Here's an example of implementing an ascending and descending order binary search tree:
```javascript
class Node {
constructor(value) {
this.value = value;
this.left = null;
this.right = null;
}
}
class BinarySearchTree {
private root;
// Function to create a new binary search tree
constructor() {
this.root = null;
}
// Inorde... (Longer than dR comment allows). -
atheist994112dI prefer hackerrank, but more so I prefer coding competition past problems, like code chef. I used to be a big fan of Google codejam, rip.
-
jestdotty554812didk why people like leetcode but last time I tried it, when I'd submit code... just randomly half the time it would fail compiling. this didn't matter if the code had any changes and it happened in different languages. like how could you have a bug that bad
also I don't understand English. like the way they describe problems just plain sucks. but to be fair I also don't read programming books. I just go straight to the code lol. I don't like it when people try to use words to describe logic. it never translates in my head
... also I wanted to make the fastest code and I think that depended on leetcode just compiling and running the code on an environment that was fast so that was lame also, cuz you kept having to hit it and also you had no way of beating earlier scores cuz their machines were just shitty now -
kiki3518811d@PappyHans when you find a job using leetcode, you become the part of that unfair system. There are jobs outside that system that are more fair.
-
PappyHans61311d@kiki i always ask what the interview process is like. If it involves leetcode then I drop. I’ve been on both sides of the process and in most cases I don’t think such tools bring any value into the job.
-
Chewbanacas72011dmaybe codewars would be something for you? the site gamifies this whole stuff as you being in a dojo, and you get kyu in a technique(language).
when you solved the problem, you can eventually make yourself feel completely dense by seeing what the top voted solution is.
i was there and did some python exercises. mate did i feel stupid after looking at the one liners after having written 30+ myself -
ars1407410dI’ve passed their stupid leetcode tests just to end up going through more bullshit. One time I was even offered a non engineering position. Fucking waste of time.
A much bigger company had me talk with them about my work experience, made sure that I knew what I was talking about, and we sealed the deal.
But you got all of those big tech wannabes that shit all over everything because they deluded themselves into thinking they’re hot shit. It’s silly. -
Chewbanacas72010d@retoor the compiler shuts down before computing the solution. then HR comes to you and tells you how dimb uou are
-
kiki3518810d@retoor imagine benchmarking people as if they were GPUs… bezos dreams level shit
And the benchmark is proprietary -
Chewbanacas72010d@retoor No but either people with a high macchiavellian score are attracted to BS jobs like these or the profession molds their character. I saw such a pattern multiple times already but i could never find a definitive answer
-
Chewbanacas72010d@retoor oh and no, i did do it remote and wanted to first inplement it myself for the challenge, and ended up copying a one-liner solution for it, which also solved the problem in O(1) so they probably thought i was the shit. at least i felt that way
-
jestdotty554810d@Chewbanacas law of attraction, so to speak
company doesn't want to be exploited, has "exploitation" on the mind, creates puzzles to minimize the chance
young buck graduate wants to exploit a company (probably he's heard about how companies exploited his grandaddy and etc), has "exploitation" on the mind, finds out companies made puzzles to filter out people such as him. learns to run the obstacle course, thinks goodies are behind that gateway, targets companies that are specifically "defensive" because he's got expertise in playing their puzzles now and if you're putting in so much effort to keep people out you must have something to raid!
everyone else? thinking about things that are not exploitation. think the whole thing is dumb and avoid it. live in totally different conceptual planes and get to avoid that whole stupid minigame -
@jestdotty had an interview with a small software boutique and when they said the first thing they do in the interview process is a logic tickle haha
it was the 100 blue gnomes (forgot the names) lightbulb problem where gargamehl will kill all 100 blue gnomes with a pumpgun if you do somethiung wrong. I took them pretty off guard when i started with the flow of thought of a pumpgun not nearly containing enough ammo to shoot all 100, that they probably should devise a plan where all of the gnomes are out of the cell. At the right time they all run, surely Gargamehl will be able to kill some, but some will live to tell the tale. And of course the fine print constraints came raining in. of course i thought about one of them being the carry over, but it would take ages!!!
Related Rants
Joined leetcode to get better at algorithms.
Fuck leetcode.
Instead of giving you enough starter code to copy and paste into your IDE and get going, they give you a function you need to implement and test cases written in plain English.
AND THEN they sell autocomplete and debugging as a premium feature.
FUCK you guys. Give me something I can import into my own tools instead of deliberately tying me down to your shitty pay to win environment.
How am I supposed to understand my deliberately complex code without a fucking debugger?!?!?
rant
leetcode