you sorted the array which is less efficient then itterating over it
why do it in Θ(nlogn) by sorting when you can just itterate for Θ(n)?
'alr approved some time ago'
added more fixed tests
added random tests
Nice catch ;)
As you are using TypeScript, you don't really need to verify if the nums exists. It will always be an array: empty or full. TypeScript guarantee this for us.
This issue has been fixed in the fork. There is not use but std::collections::HashSet is used directy in the test case.
The tests assume that solutions have use std::collections::HashSet;. Try a solution without that.
Sorry, cannot see this issue in the published fork.
Could you please specify how to reproduce this issue?
I think this one works now.
error[E0433]: failed to resolve: use of undeclared type or module `HashSet`
16 | let mut set = HashSet::new();
| ^^^^^^^ use of undeclared type or module `HashSet`
Not fixed yet.
Totally agree. Fixed in this fork
Do you have an ability to approve this new fork and replace the original (taking into account that it has a breaking change)?