Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Find the missing number in array
// Find the missing number in array // Using total count algorithm var arr = [1,2,3,5,6,7,8,9]; var total = (arr.length+1)*(arr.length+2)/2; for(i = 0; i < arr.length; i++) { total = total - arr[i]; } console.log(total);
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
fast function to reverse unsigned integer
Sort based on keys
Counting digits
horsevalue
AVL-GO-FLAT
Include object in a query string
Union of two sorted arrays
JSON parse
example for node promises
Union of two sorted arrays
Please log in to post a comment.