50
submitted 9 months ago by self@awful.systems to c/techtakes@awful.systems

who could have seen this coming, other than everyone who told the homebrew tree inverter guy this was a bad idea they absolutely shouldn’t do

you are viewing a single comment's thread
view the rest of the comments
[-] sailor_sega_saturn@awful.systems 14 points 9 months ago* (last edited 9 months ago)

No one could figure out what inverting a binary tree actually means. Like maybe swapping left and right or something?

In which case the best way to invert a binary tree of course being:

struct Node {
 private:
  Node *leftish = nullptr, *rightish = nullptr;
 public:
  static bool inverted;  // I hope no one ever needs two trees...

  // O(1) tree invert operation!
  void Invert() { inverted = !inverted; }
  Node &left() { return inverted ? *rightish : *leftish; }
  Node &right() { return inverted ? *leftish : *rightish}
};
bool Node::inverted = false;

Don't change the tree. Change your perception of the tree.

[-] froztbyte@awful.systems 6 points 9 months ago

idly, first time I've seen lemmy do any sensible render with a textblock, which retro-informs a lot about the choices for text handling (which we've wondered bout in the other thread)

[-] sc_griffith@awful.systems 13 points 9 months ago* (last edited 9 months ago)

A whiteboard is just a glorified chalkboard, and I got sick of being asked to prove I understood how to use and manipulate one of the most complex systems ever invented by man by basically rubbing a soft rock against a hard rock.

I'm now in favor of puzzle interview questions, just so this guy gets asked them

EDIT: I was trying to reply to a different comment whoops. this is from the hackernews thread

[-] blakestacey@awful.systems 14 points 9 months ago

His complaint seriously backfired here, because it makes working on a chalkboard sound epic. The act of rubbing one rock against another becomes ascendance into the highest realms of thought? That's fuckin' alchemy, bro.

load more comments (6 replies)
load more comments (6 replies)
load more comments (8 replies)
this post was submitted on 20 Apr 2024
50 points (100.0% liked)

TechTakes

1602 readers
242 users here now

Big brain tech dude got yet another clueless take over at HackerNews etc? Here's the place to vent. Orange site, VC foolishness, all welcome.

This is not debate club. Unless it’s amusing debate.

For actually-good tech, you want our NotAwfulTech community

founded 2 years ago
MODERATORS