Two basic algorithm questions

Source: Internet
Author: User

1, Compile the method to generate a one-dimensional array that meets the following requirements. The requirements are as follows: 1) The length of the array is 20 (2 points) 2) Contains all integers (5 points) between two groups (1-10) 3) The position of each element is not fixed, that is, a random array (8 points) 4) The return value of this method is the one-dimensional array (2 points) 5) Code Standard (3 points) 2, Write method: returns the number with the largest number in an integer. If the number is the same, the maximum number in the same number is returned. For example, 12121 returns, returns, and 9 returns the following requirements: 1) Method Declaration (2 points) 2) Calculate the number of occurrences (5 points) 3) Returns the correct number (10 points) 4) Code specification (3 points)

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.