Skip to main content

All Questions

Tagged with
-4 votes
1 answer
69 views

Calculate math function depend on N value [closed]

I have method with the following prototype : R[] = method(k,n) which : n = ordinal value 0 <n <10^9 k = math function depend on n value : i.e n^6 R = array of computed values For example : n = ...
whiteRice's user avatar
1 vote
2 answers
274 views

Algorithm to order array

Take for example this input array: [2,7,1,4,9] For this input, I need to produce an array of total 23 elements which contains two elements of 2, seven elements of 7, one element of 1, four elements ...
Dusan's user avatar
  • 585