Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 347 Weeks Ago, 3 Days Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Programming Posted 02 May 2017 My Price 5.00

Write a method countCommon that accepts two lists

Write a method countCommon that accepts two lists of integers as parameters and returns the number of unique integers that occur in both lists. Use one or more sets as storage to help you solve this problem. For example, if one list contains the values [3, 7, 3, –1, 2, 3, 7, 2, 15, 15] and the other list contains the values [–5, 15, 2, –1, 7, 15, 36], your method should return 4 because the elements –1, 2, 7, and 15 occur in both lists.

 

 

Answers

(8)
Status NEW Posted 02 May 2017 06:05 PM My Price 5.00

-----------

Attachments

file 1493749033-answer1.docx preview (225 words )
W-----------rit-----------e a----------- me-----------tho-----------d c-----------oun-----------tCo-----------mmo-----------n t-----------hat----------- ac-----------cep-----------ts -----------two----------- li-----------sts----------- of----------- in-----------teg-----------ers----------- as----------- pa-----------ram-----------ete-----------rs -----------and----------- re-----------tur-----------ns -----------the----------- nu-----------mbe-----------r o-----------f u-----------niq-----------ue -----------int-----------ege-----------rs -----------tha-----------t o-----------ccu-----------r i-----------n b-----------oth----------- li-----------sts-----------. U-----------se -----------one----------- or----------- mo-----------re -----------set-----------s a-----------s s-----------tor-----------age----------- to----------- he-----------lp -----------you----------- so-----------lve----------- th-----------is -----------pro-----------ble-----------m. -----------For----------- ex-----------amp-----------le,----------- if----------- on-----------e l-----------ist----------- co-----------nta-----------ins----------- th-----------e v-----------alu-----------es -----------[3,----------- 7,----------- 3,----------- â€-----------“1,----------- 2,----------- 3,----------- 7,----------- 2,----------- 15-----------, 1-----------5] -----------and----------- th-----------e o-----------the-----------r l-----------ist----------- co-----------nta-----------ins----------- th-----------e v-----------alu-----------es -----------[â€-----------“5,----------- 15-----------, 2-----------, â-----------€“1-----------, 7-----------, 1-----------5, -----------36]-----------, y-----------our----------- me-----------tho-----------d s-----------hou-----------ld -----------ret-----------urn----------- 4 -----------bec-----------aus-----------e t-----------he -----------ele-----------men-----------ts -----------–-----------1, -----------2, -----------7, -----------and----------- 15-----------
Not Rated(0)