US · interviewqs.com

Check whether two arrays are equal

Python, Data Structures, Arrays,


This email was sent

Is this your brand on Milled? Claim it.

InterviewQs

Check whether two arrays are equal

Python Data Structures Arrays

Forward this email to a friend or colleague and challenge them to solve it.

Hi, 

Given two arrays, write a function in vanilla Python (e.g., no libraries) to check whether or not the arrays are equal. You can consider the two arrays equal if both of them contain the same set of elements - the order of elements can differ.

For example:

                    

#Given the following:

arr1 = [1,5,6,7,8,0]

arr2 = [0,5,7,6,8,1]

#output = Yes

arr3 = [1,5,6,7,8,0]

arr4 = [0,7,7,7,8,1]



 

You’ve accumulated 126 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one) + our new Case studies.


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe
Are you sure?

Lists help you organize the brands that you care about. Your lists are private to you.