Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Program that removes comments from C and C++ programs

I have downloaded the latest version of the Linux kernel and I want to perform thorough analysis on it. I want to start by eliminating comments from all the source and header files that belong to it. ...

c parsing  
asked by machine_1 13 votes
answered by Edward 21 votes

Vigenère cipher in Python

Over the last year I have been programming on my own, mostly in Python. I haven't had any formal education, though I have followed some online instructions, and have been making things that interest ...

python vigenere-cipher  
asked by Yorick 9 votes
answered by Graipher 4 votes

Autocompleting console input

Yesterday I stumbled upon a Stack Overflow question that asked if it was possible to implement Tab-triggered auto-completion in a console application. I thought that was an interesting idea, so I ...

c# console autocomplete  
asked by Mat's Mug 9 votes
answered by t3chb0t 1 vote

Pigeon and grain problem: find time until all the grain is eaten

Problem: There are \$n\$ pigeons and \$m\$ grains. Pigeon \$i\$ eats a single grain every \$x_i\$ seconds. Find the time until all the grain is eaten. Input: A line with the ...

python algorithm programming-challenge time-limit-exceeded  
asked by Rohit Srivastava 8 votes
answered by machine yearning 7 votes

Table tennis exercise builder

I am trying to create a builder for table tennis exercises. User Blindman67 helped me here. Now I'm trying to clean up the code before continuing to work on it. Please tell me how to clean up the ...

javascript game canvas  
asked by Tweakimp 8 votes
answered by Sumurai8 7 votes

Return a key when a function returns true

I've no idea what to call this, so I called it Classify since that's how I use it. Basically, the idea is to pass a Dictionary<TResult, Func<TValue, bool>> which is evaluated for an ...

c# .net generics  
asked by EBrown 8 votes
answered by Mat's Mug 8 votes

Saving the Universe - Code Jam 2008 Qualification problem A

I'm trying to brush up on my Python, so I'm going through some simple problems. Big concerns are style, though any algorithmic problems I'm open to suggestions on. Basically you have an input file ...

python programming-challenge python-3.x  
asked by Adam Martin 8 votes
answered by vnp 5 votes

Greatest hits from previous weeks:

Determining triangle type from three integer inputs

The logic is simple, but I was wondering if anyone could help with rewriting the conditional logic. Also, the only error conditions I can think of are the sides should not be equal to or less than ...

java  
asked by Phoenix 5 votes
answered by codesparkle 4 votes

Grouping elements in array by multiple properties

During work, I was given this task: to group elements with similar properties in the array. In general, the problem is as follows: var list = [ {name: "1", lastname: "foo1", age: "16"}, ...

javascript sorting properties  
asked by Saike 22 votes
answered by konijn 25 votes

Can you answer these?

Pathfinder from image file

I've created a simple pathfinder programme that receives its input from a very small .png file. Example file here: Here's a link to the file (note that the green pixel represents the start, the red ...

python python-3.x image pathfinding  
asked by user2635139 3 votes

Variable length integer encoding in Java

I have coded up the variable length integer encoding aka VLQ in Java. It works with any base in (1, 128]. I've implemented the usual encode/decode methods and also the addition and multiplication for ...

java integer  
asked by redoc 3 votes

Prim's MST Java implementation

Can someone review this code, just have look if it's logically correct or If you may point me to a more simple and minimalist program import java.util.ArrayList; import java.util.Arrays; import ...

java algorithm graph  
asked by aishwat singh 2 votes
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3