Hey Stack overflow
what's better? nNodes or nodeCount
Hey Stack overflow
what's better? nNodes or nodeCount
This is simply a style issue. I prefer nodeCount
because I find it clearer. nNodes
is more similar to Hungarian notation, but doesn't say it's a count variable.
Whichever is consistent with the rest of your code base / style guide / dev team.
It really depends on the accepted naming conventions of whichever language you are using, but nodeCount
is more readable. If you are using Java, you can use the Java Naming Conventions guide.
The first one in C++, the second one in C#/Java.
Though this is really very subjective question and should be answered by your team/company guidelines.