2022 Developer Survey is open! Take survey.
4 votes
Accepted

Linked list implementation in cpp

Overview This is a singly linked list. Which is fine. But it is relatively trivial to implement a doubly linked list (next/prev link in each node). Also by using a doubly linked list and a sentinel (...
user avatar
  • 91.5k
2 votes

Basic Stack Operations using Linked List in C

isEmpty is anti-idiomatic: if (top == NULL) { return 1; } else { return 0; } is a very long way to say <...
user avatar
  • 53.1k
1 vote
Accepted

Basic Stack Operations using Linked List in C

push() has undefined behaviour any time its malloc() returns a null pointer. isFull() leaks ...
user avatar
  • 57.8k
1 vote
Accepted

UpdateCustomer - implementation in C++

First thing I'd say is that it will help document your code if you make function arguments const references when you aren't changing them. It might also help performance, but thats normally less ...
user avatar
  • 1,397
1 vote
Accepted

std::list implementation learning exercise

There’s no point in a design review, because this class is simply a remake of std::list, so I’ll just dive right into the code review. You don’t specify which ...
user avatar
  • 8,241

Only top scored, non community-wiki answers of a minimum length are eligible