Find whether an array is a subset of another array in python | Love Babbar sheet
Vložit
- čas přidán 21. 01. 2023
- Question Link: practice.geeksforgeeks.org/pr...
Question Name : Find whether and array is a subset of another array
Instagram Link : / coding_crane
CZcams Link : www.youtube.com/@codingcrane5...
#python #python #lovebabbardsasheet #dsa #codinglife #shorts #algorithm #leetcode #hackerrank #learning #learn #nonmedical #engineering #viral #trending #codecademy #codechef #study #students
very well explained 👍
Thank you 😃
i tried your above mentioned solution but it failed for duplicate items there for i tried this:
for i in range(m):
if a2[i] in a1:
a1.remove(a2[i])
else:
return "No"
return "Yes"
and it worked
btw your approach was very near to that : )
your logic is correct,but solution required max(n,m) time complexity. and your solution is of o(n^2) . will not accepted
Mam u don"t you anything about dsa logic why are u wasting time of innocent students your logic is totally wrong..........