New answers tagged array
0
votes
Calculating the sum of all k-sized sub-arrays in an array using sliding window algorithm
A short review;
You use var for the function, I would use const, actually I would just use ...
1
vote
Automation of array allocation in C
There's no way to enable the logging without modifying the header.
Consider allowing VARRAY_DISPLAYDEBUG to be set before inclusion (to enable for specific ...
3
votes
C++20 "FixedArray" Container (dynamically allocated fixed-size array)
G. Sliepen's answer covers some good ideas already, but here are some additional points.
Memory leak: Exception safety
If a T has a constructor that throws, and a constructor does throw in the loop of ...
1
vote
Calculating the sum of all k-sized sub-arrays in an array using sliding window algorithm
Generally, LGTM. That said,
It unclear what should happen if k > arr,length. In any case, better test it before entering the first loop.
If the sliding window ...
3
votes
Counting duplicate elements in two sorted arrays
The first thing I notice about the single function presented is the lack of a doc comment.
Then again it is private, and readable enough I think I get what it does, ...
4
votes
Counting duplicate elements in two sorted arrays
Looks good and correct, I'd have only two suggestions:
Your function is called _find_Duplicates but it actually counts them, so ...
1
vote
Accepted
Reusable storage for array of objects V3
Incorrect pointer used to construct objects
You are constructing the objects using the non-aligned pointer.
Use the pointer returned from new to destruct the ...
2
votes
Accepted
Top 50 recent answers are included
Related Tags
array × 2114java × 497
javascript × 402
performance × 323
algorithm × 249
php × 224
c++ × 216
python × 201
beginner × 179
c × 178
c# × 167
strings × 124
programming-challenge × 104
sorting × 100
object-oriented × 67
vba × 56
ruby × 52
interview-questions × 50
numpy × 44
recursion × 42
excel × 41
hash-map × 41
ecmascript-6 × 41
python-3.x × 39
random × 36