[SOLVED] JAVA - Assignment 3java

30.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

How do you sort an array of 0 and 1?

You are given an array of 0s and 1s in random order and you have to sort this array i.e Segregate 0s on the left side and 1s on the right side of the array.

  1. How do you rotate an array?

You will be given an input number N and N numbers following it as the input. You are also given an integer K which represents how many times you have to rotate the array. Rotate the array K values to the right if K is positive and K values to the left if K is negative. If K=0, do not rotate the array.

The figure shows how the rotating array will look if k=2.

3.Find out smallest and largest number in a given Array?

  1. Java Program to Find Second Largest and Smallest Elements in an Array.
  2. Java Program to Find the Minimum Distance between Array Elements.
  3. Java Programs on Inserting & Deleting Elements from an Array.
  4. Java Program to Cyclically Permute the Elements of an Array.
  5. Java Program to Find the Missing Element in an Integer Array.
  6. Java Program to Print All the Leaders in an Array.
  7. Take an array as input from the user. Search for a given number x and print the index at which it occurs.
  8. https://www.hackerrank.com/challenges/java1darray/problem?isFullScreen=true
  9. https://www.hackerrank.com/challenges/java1darrayintroduction/problem?isFullScreen=true
  10. https://www.hackerrank.com/challenges/javanegativesubarray/problem?isFullScreen=true

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.