New answers tagged comparative-review
4
votes
"Select followed by First" versus "First followed by Select" when summing the data for a student
Option 1
students
.Select(x => new { Id = x.Id, Sum = x.Data.SelectMany(n => n).Sum() })
.FirstOrDefault(s => s.Id == 1)
.Sum;
...
4
votes
Accepted
Calculate the number of people occupied at each time interval
Generally, at the edge of your program you shouldn't be entering datetimes as timestamp numeric literals, but as human-legible datetimes. On the inside of your program, you also shouldn't be ...
Top 50 recent answers are included
Related Tags
comparative-review × 915java × 169
python × 168
c# × 146
performance × 142
javascript × 110
c++ × 78
strings × 66
algorithm × 61
beginner × 59
programming-challenge × 57
php × 54
object-oriented × 51
python-3.x × 47
c × 41
functional-programming × 32
array × 24
ruby × 24
interview-questions × 19
error-handling × 18
complexity × 18
haskell × 16
datetime × 16
unit-testing × 16
hash-map × 16