DEV Community

Discussion on: #0 Hello World of DATA STRUCTURES

Collapse
 
pgradot profile image
Pierre Gradot • Edited

When I see functions such as isFull() or isEmpty(), you are no longer talking about arrays, but a more sophisticated data types. And by the way, because these functions have no parameter, you have some troubles to implement them ;)

But more important: in C++, you should probably use std::array or std::vector instead of plain C arrays, in most cases.

Collapse
 
abhilearnstocode profile image
Abhii

Good point Pierre!
My focus is more to explain the logic rather than going into the syntax of the language.
And yes, you are right about the isFull() and isEmpty() has no parameters but again I focused more on explaining rather than validating my code.

Thank you for your suggestions buddy!

Collapse
 
pgradot profile image
Pierre Gradot

If code is not you main concern because you want to focus on algorithms, then you may use pseudo-code instead ;) Using a incomplete or incorrect may confuse your readers and distract them from your real purpose.

Collapse
 
abhilearnstocode profile image
Abhii

Hey Pierre,
I would love if you share some resources for us to learn more about Data Structures.

It would be a great help.

Collapse
 
pgradot profile image
Pierre Gradot

I don't have such documents available sorry ;)