Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Add this tag to your question to indicate that you are new to the language of your code. This will often be taken into consideration by reviewers when assessing your code.
3
votes
Finding the biggest number in a list of numbers
The most obvious thing I can see is that you wrote a loop when one was not needed.
largest = max(n)
Also, check your boundary conditions. What happens if no numbers are entered?
12
votes
FizzBuzz implementation using the ternary operator
At first I wasn't sure whether this code would compile correctly (but obviously it does). The reason it does is due to two independent features of Java.
The System.out.println() method has an overloa …
12
votes
Accepted
x64 Assembly - checking for largest prime factor
One optimisation that would make your code run up to twice as fast, is to use the observation that a prime factor of n cannot be greater than n/2. So you can limit the number of times you iterate thro …
10
votes
Simple webserver in C
Are you sure that &(int) { 1 } does what you want it to do? I'm not sure it does.
Using malloc()/strcpy() is probably better handled with strdup() (which you've used elsewhere, so you're already oka …