Ayudar a las personas que los contratan
Answer:
Explanation:
Well here you only have to add 2 new horses .... so simply what you can do is find 2 slots where the gap is maximum ... lets take the given example in detail to understand the same.... here 10001001000010 here you can observe that the difference between the first two filled slots is 3 then 2 then 4 then 1....... make it a separate array ...... now as i said that we just need to place two new horses so we just need two of the biggest numbers from this array and place the new horses at the center of the corresponding slots ... like here 3 and 4 are greatest ... so one horse is placed in between the gap corresponding to 3 while other at 4 ..... after making the new array answer can be find in linear time itself... I hope this makes sense ....
Now lets understand how to program it easily so firstly after scanning all stuff ..... we will make a gap array .... then just think now what we will do is find the greatest two numbers then again putting the horses and then find our answers .... so now an easy approach is that instead of making the string again and again searching for answer .... what we do is just do half of the two greatest ones and again find the greatest one in array....
Answer:
mobile calculator
Explanation:
The mobile calculator application is a mobile software on phones and other computer devices that returns the answer to a calculation given the operands and opcode specified by the user.
Answer:
public class array{
public static void main(String []args){
int[] array = {2,4,7,1,9};
int num_vals = array.length;
for(int i=0;i<num_vals;i++){
System.out.println(array[i] + " ");
}
for(int i=num_vals-1;i>=0;i--){
System.out.println(array[i] + " ");
}
}
}
Explanation:
First create the class in the java programming.
Then create the main function and declare the array with values.
Store the size of array in num_vals variable by using the function array.length.
create a for loop to iterate the each element in the array and then print on the screen with spaces and newline.
it traverse the loop from first to last.
Then, again create the for loop to iterate the each element in the array and then print on the screen with spaces and newline but the traversing start from last to first.
You Need Software To Screen Capture
The Software You can use is OBS its free and there are watermarks