Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a program using Java to find the middle node of a linked list (ensure that the number of nodes of the LL is an odd number).


Write a program using Java to reverse the elements of a linked list.


Write a program using Java to find the number of common elements of two linked lists.

e.g. 1 3 5 7 null

        2 3 7 9 11 null

Output: 2


Write a program using Java to move the last element of a LL to the beginning of the list.


Write a Java program to find maximum product of two integers in a given array of integers.  

 

Example:

Input :

nums = { 2, 3, 5, 7, -7, 5, 8, -5 }

Output:

Pair is (7, 8), Maximum Product: 56


Write a Java program to shuffle a given array of integers.


Write a Java program to form the largest number from a given list of non-negative integers.  

 

Example:

Input :

nums = {1, 2, 3, 0, 4, 6}

Output:

Largest number using the given array numbers: 643210


Write a Java program to rearrange a given array of unique elements such that every second element of the array is greater than its left and right elements.  

 

Example:

Input :

nums= { 1, 2, 4, 9, 5, 3, 8, 7, 10, 12, 14 }

Output:

Array with every second element is greater than its left and right elements:

[1, 4, 2, 9, 3, 8, 5, 10, 7, 14, 12]


Given two sorted arrays A and B of size p and q, write a Java program to merge elements of A with B by maintaining the sorted order i.e. fill A with first p smallest elements and fill B with remaining elements.


Write a Java program to arrange the elements of a given array of integers where all negative integers appear before all the positive integers.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS