DEV Community

Discussion on: Counting Inversion by piggybacking on Merge Sort with Python and C++

Collapse
 
sandordargo profile image
Sandor Dargo

You have a resource leak in the C++ implementation, you forgot to close the file.

Besides, I'd avoid adding #include "bits/stdc++.h" in any code example. It's not portable and it bloats your binary size. Include what you need and know in which header it is.