Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.
5 votes

Implementation of the "tee" utility program

There are things that could be simplified: The variable append exists just to decide the value of flags. Why not just set <...
user avatar
  • 57.8k
3 votes

another attempt to implement the tee command

I see no reason to use system calls. Here it on;y hurts portability. After all, a conforming implementation is not required to provide open, read, write, etc. ...
user avatar
  • 53.1k
3 votes

Find first and last matches on a sorted list

Binary search This should be a binary search as that is the expected algorithm. Why? because the array is sorted. Your function does not take advantage of the fact that the elements are sorted. ...
user avatar
2 votes

Duplicate Binary Search Improvements

Style issue There is a style guide for Python called PEP 8 which is definitly worth reading. Among other things: Avoid trailing whitespace anywhere Comparisons to singletons like None should always ...
user avatar
  • 28.7k
2 votes

improved "tee" utility

General Observations You are obviously interested in improving your Linux and C programming skills and this is a good thing. The code in general is improving. The use of ...
user avatar
  • 18.3k
1 vote

C++ Doubly linked list, including benchmark vs std::list

Hide ListNode and ListIterator These classes are implementation details of LinkedList. ...
user avatar
  • 32.6k
1 vote

Implementation of the "tee" utility program

General Observations This is definitely an improvement over the previous question. All calls to exit() have been removed from main. I will say that some of them ...
user avatar
  • 18.3k
1 vote

another attempt to implement the tee command

General Observations The code looks like it has been copied and pasted from another implementation. One of the reasons I say this is that the exit(STATUS) function ...
user avatar
  • 18.3k
1 vote

Find first and last matches on a sorted list

A short review; I prefer list over arr, because I prefer fully spelled out words above abbreviations, but I like obvious one ...
user avatar
  • 32.4k
1 vote

Find first and last matches on a sorted list

You answer seems fine. Don't worry about how other people have solved the same problem. The break/continue logic is not bad GIVEN the question, but you should definitely comment in your code what the ...
user avatar
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