# Given the array | Computer Science homework help

1) Given the array [4,13,10,21,20] sort every element where even numbers are on the left and odd numbers are on the right…even before odd and the function must return the number of swaps/counts or moves required to sort the array. This array [4,13,10,21,20] in particular should return 1 from number of moves required to sort the array even odd. nothing should be in the main method?

19 August 2018 08:24

input-[4,13,10,21,20] output- [even,odd] number of moves: 1

19 August 2018 08:34

2) My second Java problem is getting the integer complement of a number denoted by n. The Java question is asking for the numbers bitwise inversion from its highest-order 1-bit through its lowest-order bit. For example the number n = 5 is represented as 0000010 in binary. The binary complement of n is 010, which is 2 in decimal notation. The question has one getIntegerComplement function with one parameter: a base-10 integer,n. This integer must return the complement of n as a base-10 integer?

19 August 2018 08:37

19 August 2018 08:46

3. Complete a function in Java that returns the first non-repeated character in a given a string. My function nonRepeated has one parameter (string s). The characters are treated as case sensitive. so ‘a’ is different Java Problem 3. from ‘A’. The example input would be “mnonmpsms” and the output would be ‘o’ as the first non-repeated character. again, should be in Java nothing in main method?

Final important note: The java source code must be significate from any online resources as that would cause any plagiarism flag to be raised.

Given the array | Computer Science homework help

1) Given the array [4,13,10,21,20] sort every element where even numbers are on the left and odd numbers are on the right…even before odd and the function must return the number of swaps/counts or moves required to sort the array. This array [4,13,10,21,20] in particular should return 1 from number of moves required to sort the array even odd. nothing should be in the main method?

19 August 2018 08:24

input-[4,13,10,21,20] output- [even,odd] number of moves: 1

19 August 2018 08:34

2) My second Java problem is getting the integer complement of a number denoted by n. The Java question is asking for the numbers bitwise inversion from its highest-order 1-bit through its lowest-order bit. For example the number n = 5 is represented as 0000010 in binary. The binary complement of n is 010, which is 2 in decimal notation. The question has one getIntegerComplement function with one parameter: a base-10 integer,n. This integer must return the complement of n as a base-10 integer?

19 August 2018 08:37

19 August 2018 08:46

3. Complete a function in Java that returns the first non-repeated character in a given a string. My function nonRepeated has one parameter (string s). The characters are treated as case sensitive. so ‘a’ is different Java Problem 3. from ‘A’. The example input would be “mnonmpsms” and the output would be ‘o’ as the first non-repeated character. again, should be in Java nothing in main method?

Final important note: The java source code must be significate from any online resources as that would cause any plagiarism flag to be raised.