12 questions linked to/from infix_iterator code
16k views

### In-place reversal of a singly linked list

As suggested in The 2nd Monitor, I'd like a review of this in-place reversal of a singly linked-list: ...
4k views

### Elegantly exclude part of an operation for the last iteration in a loop [closed]

I'm afraid just about everybody who read this question has misunderstood it. I'm not trying to find the best way of printing a vector. I'm trying to find the best way of excluding part of an operation ...
1k views

### Convert sequence of number into display string

My requirement is to convert a sequence of numbers into a display string as below. Example Input 1,2,3,4,5,7,7,8,8,8,10,15,10,11,12,88,87,86 Output 1-5,7-8,10-12,15,86-88 ...
2k views

### Google Code Jam - reverse words

As a sequel from my previous question, I decided to solve the next problem statement from the GCJ dash board. Any thorough critique, this time, with much attention to skill and technicalities would ...
842 views

### Simple randomization program

I'm a few months into learning C++ programming and I want to know if I'm moving generally in the right direction or not with the following code. This is the most advanced thing I've created so far, ...
3k views

### Building a simple singly-linked list in C++11

The implementation below works, but I'm wondering if there's a modern C++ alternative. For example: Should I replace the raw new with a braced initializer? Should ...
9k views

### Writing a vector to a file

The following function (function template rather) is to take a vector of any type and write it a file using a filestream object. ...
4k views

### Implementation of templated Doubly Linked List class in c++

The code below is my implementation of Templated Doubly Linked List in C++. I would be much obliged if you review my code and give me pointers on where and how I can improve the code. Thanks in ...
296 views

### Summing up ints in vectors for education

To get started with C++11/14/17, I decided to write a program that brute forces the problem described in this video (and gives a progress update every few seconds): Divide the numbers [0, 31] into ...
707 views

### Selecting function overload based on a type match with return value of passed callable

On an std::list<A> or std::vector<A> or other collection container, the functor map (fmap) operation takes a ...
My first algorithm for finding the factors of a number was pretty slow and horrible (it started at $O(n^2)$, where n was not even the inputted number), but I eventually came up with this new code. ...