Title Searching Values of a List in Another List (Case 3)
Catalog Type SLCItem
Persistent ID https://pawscomp2.sis.pitt.edu/pcex/pcex_v2/index.html?lang=PYTHON&set=py_search_list&ch=py_search_list_count_each
Platform Name PCEX
Features
Description Construct a program that has a function that receives two lists and creates a list that contains the number of times each element in the 2nd list appears in the 1st list. For example, if the 1st list is [1, 2, 3, 3, 4, 4, 5, 6] and the 2nd list is [3, 4, 5, 6, 7], then the list that contains the number of times each element in the 2nd list appears in the 1st list is [2, 2, 1, 1, 0].\nAssume that all elements in the 2nd list are unique.
Keywords list, search algorithms
Author Kamil Akhuseyinoglu
Institution University of Pittsburgh
Iframe URL https://pawscomp2.sis.pitt.edu/pcex/pcex_v2/index.html?lang=PYTHON&set=py_search_list&ch=py_search_list_count_each
Protocol PITT, HTML
Protocol URL
License MIT
Programming Language Python
Natural Language en

Preview