I need to separate an array considering count of threads. For example i have the array [1][2][3][4][5][6][7][8][9][10] and user print count of thread which will be work with elements in this array. My task is distribute the work between arrays' elements and threads.
Count of threads = 2 -> thread1:[1][2][3][4][5] thread2:[6][7][8][9][10]. But what i need to do if threads will be for instance 7. Ho to separate work in this case?
[1][2][3][4][5][6][7][8][9][10]is a 10-dimensional array, not a single array of 10 elements.{1,2,3,4,5,6,7,8,9,10}is a single array with 10 elements.