I have found many cool java solutions on the forum, this one, this one, and this one, however, when I rewrite them to C++, none of them can pass the OJ. All of them have "Runtime Error", which is hard to debug. So I was wondering is there any c++ solution that can pass the OJ.
Hey I wrote a C++ solution see it here solution .
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.