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 <...
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. ...
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. ...
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 ...
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 ...
1
vote
C++ Doubly linked list, including benchmark vs std::list
Hide ListNode and ListIterator
These classes are implementation details of LinkedList. ...
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 ...
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
reinventing-the-wheel × 925c++ × 268
python × 200
c × 121
java × 119
python-3.x × 100
beginner × 90
algorithm × 81
strings × 73
performance × 72
c# × 66
linked-list × 66
c++11 × 62
javascript × 50
haskell × 46
object-oriented × 36
parsing × 30
sorting × 30
memory-management × 28
c++17 × 28
stack × 25
pointers × 25
hash-map × 24
array × 23
cryptography × 23