##
How will the output array be after following operations?

Set Integer array= {1,3,5,7,8}

Set Integer item = 10

Set I

Question

How will the output array be after following operations?

Set Integer array= {1,3,5,7,8}

Set Integer item = 10

Set Integer k = 3

Set Integer n = 5

Set Integer j= n

Set Integer n = n + 1

while( j >= k)

array(+1) = arrayol

j =j-1

end-while

array[k] = item

[2 Marks]

in progress
0

Mathematics
3 months
2021-07-24T13:49:52+00:00
2021-07-24T13:49:52+00:00 1 Answers
0 views
0
## Answers ( )

Answer:Given an array of size n, find all elements in array that appear more than n/k times. For example, if the input arrays is {3, 1, 2, 2, 1, 2, 3, 3} and k is 4, then the output should be [2, 3]. Note that size of array is 8 (or n = 8), so we need to find all elements that appear more than 2 (or 8/4) times. There are two elements that appear more than two times, 2 and 3.Given an array of size n, find all elements in array that appear more than n/k times. For example, if the input arrays is {3, 1, 2, 2, 1, 2, 3, 3} and k is 4, then the output should be [2, 3]. Note that size of array is 8 (or n = 8), so we need to find all elements that appear more than 2 (or 8/4) times. There are two elements that appear more than two times, 2 and 3. Now,Mark me as a brainlist.Given an array of size n, find all elements in array that appear more than n/k times. For example, if the input arrays is {3, 1, 2, 2, 1, 2, 3, 3} and k is 4, then the output should be [2, 3]. Note that size of array is 8 (or n = 8), so we need to find all elements that appear more than 2 (or 8/4) times. There are two elements that appear more than two times, 2 and 3. Now,Mark me as a brainlist.Step-by-step explanation:Given an array of size n, find all elements in array that appear more than n/k times. For example, if the input arrays is {3, 1, 2, 2, 1, 2, 3, 3} and k is 4, then the output should be [2, 3]. Note that size of array is 8 (or n = 8), so we need to find all elements that appear more than 2 (or 8/4) times. There are two elements that appear more than two times, 2 and 3. Now,Mark me as a brainlist.Step-by-step explanation:Given an array of size n, find all elements in array that appear more than n/k times. For example, if the input arrays is {3, 1, 2, 2, 1, 2, 3, 3} and k is 4, then the output should be [2, 3]. Note that size of array is 8 (or n = 8), so we need to find all elements that appear more than 2 (or 8/4) times. There are two elements that appear more than two times, 2 and 3.