Grokking the Coding Interview: Patterns for Coding Questions
Vote

0% completed

​

Invert Binary Tree (medium)

.....

.....

.....

Like the course? Get enrolled and start learning!
A

Anonymous

· 3 years ago

For all of the mult-threaded questions, if you code in C++, neither the Run or Submit buttons will be able to compile and run the code. I get the following compilation error, even when trying to run the official solution in the "Try it yourself" editor:

/usr/bin/ld: /tmp/cc2b5PvT.o: in function std::thread::thread<void (Solution::*)(TreeNodeT<int>*, int), Solution*, TreeNodeT<int>*&, int, void>(void (Solution::*&&)(TreeNodeT<int>*, int), Solution*&&, TreeNodeT<int>*&, int&&)': run.cpp:(.text._ZNSt6threadC2IM8SolutionFvP9TreeNodeTIiEiEJPS1_RS4_iEvEEOT_DpOT0_[_ZNSt6threadC5IM8SolutionFvP9TreeNodeTIiEiEJPS1_RS4_iEvEEOT_DpOT0_]+0x33): undefined reference to pthread_create' collect2: error: ld returned 1 exit status

A cursory online search for this error suggests that the proper fix is to

A

Anonymous

· 4 years ago

Please add python :((

Show 2 replies

Reading Progress

0%


Vote for new content