Realtime Writers
  • Home
  • Writers
  • FAQ
  • Blog
  • My Account
  • Order Now
  • Menu Menu

Introduction to Computing Science and Programming CSCI 1226-2 Winter 2019- Array Techniques (Arrays)

July 28, 2024/0 Comments/in Uncategorized /by Admin

Summary This assignment consists of a few basic array-based operations such as search, sort, insert, remove and merge. Details You have been provided with a driver program (TestArrayTechniques.java) and a skeleton of ArrayTechniques.java. Your task is to complete ArrayTechniques.java. Currently, only method stubs are available in ArrayTechniques.java. You have to implement the methods by following the descriptions below. ArrayTechniques.java have the following methods:

• findElement: searches for an element in an array and returns the index of the first occurrence of the element if it is found. If the element is not found, it returns -1. • findFrequency: find the number of occurrences of an element in an array. It returns the number of occurrence if the given element is present in the array. If the element is not present in the array, the method returns 0.

• insertElement: The method receives the array, the element to be inserted and the number of elements in the array (array size and then inserts the element at the end of the array. If the number of elements is equal to the array length (total capacity of the array), then insert operation fails and returns false. If the element is successfully inserted into the array, the method returns a true.

• removeElement Like insert method, this method also receives the array, the element to be removed and the number of elements in the array (array size), and then removes the element from the array if it is found. If the array is empty or the element is not found in the array, then the removal operation fails and returns false. Otherwise, the element is successfully removed from the array, and the method returns a true. To remove an element, you can just overwrite the contents of the array as follows, a[i]=a[i+1], where i starts from the index of the element to be removed.

• findMedian this method returns the median of the array elements. There are different ways one can find median of a set of elements. In this assignment, you may use the Arrays.sort() method to first sort the arry and then return the middle element. Note that if the array size is even, then the median is the average of the two middle elements, and if the array size is odd, the median is the middle element, both in the sorted array. 

Share this entry
  • Share on WhatsApp
  • Link to Instagram
https://realtimewriters.com/wp-content/uploads/2025/01/Realtime-Writers-Transparent_white-bg.png 0 0 Admin https://realtimewriters.com/wp-content/uploads/2025/01/Realtime-Writers-Transparent_white-bg.png Admin2024-07-28 23:12:112024-07-28 23:12:11Introduction to Computing Science and Programming CSCI 1226-2 Winter 2019- Array Techniques (Arrays)
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

You must be logged in to post a comment.

Calculate the Price

Deadline
Type of paper
Academic level
Pages
Plagiarism report FREE
Unlimited revisions FREE
Unlimited sources FREE
Title pageFREE
FormattingFREE

$0.00

Secure Payment

IntaSend Secure Payments (PCI-DSS Compliant) Secured by IntaSend Payments

Writing Services

  • Essays
  • Research Papers
  • Assignments
  • Course Work
  • Thesis

We Accept

  • PayPal
  • Visa
  • Mastercard
  • Apple Pay
  • Google Pay

© 2025 Realtime Writers | All Rights Reserved

Plan a group work project in Mental health (Bipolar) Demonstrate an understanding of your chosen essay subject and how it integrates... Scroll to top

This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.

AcceptRejectSettings

Cookie and Privacy Settings



How we use cookies

We may request cookies to be set on your device. We use cookies to let us know when you visit our websites, how you interact with us, to enrich your user experience, and to customize your relationship with our website.

Click on the different category headings to find out more. You can also change some of your preferences. Note that blocking some types of cookies may impact your experience on our websites and the services we are able to offer.

Essential Website Cookies

These cookies are strictly necessary to provide you with services available through our website and to use some of its features.

Because these cookies are strictly necessary to deliver the website, refuseing them will have impact how our site functions. You always can block or delete cookies by changing your browser settings and force blocking all cookies on this website. But this will always prompt you to accept/refuse cookies when revisiting our site.

We fully respect if you want to refuse cookies but to avoid asking you again and again kindly allow us to store a cookie for that. You are free to opt out any time or opt in for other cookies to get a better experience. If you refuse cookies we will remove all set cookies in our domain.

We provide you with a list of stored cookies on your computer in our domain so you can check what we stored. Due to security reasons we are not able to show or modify cookies from other domains. You can check these in your browser security settings.

Other external services

We also use different external services like Google Webfonts, Google Maps, and external Video providers. Since these providers may collect personal data like your IP address we allow you to block them here. Please be aware that this might heavily reduce the functionality and appearance of our site. Changes will take effect once you reload the page.

Google Webfont Settings:

Google Map Settings:

Google reCaptcha Settings:

Vimeo and Youtube video embeds:

Privacy Policy

You can read about our cookies and privacy settings in detail on our Privacy Policy Page.

Privacy Policy
Accept Reject

WhatsApp