Python-Algos: Find the Missing Element

def findt_missing(arr1,arr2):
arr1.sort()
arr2.sort()

for num1, num2 in zip(arr1,arr2):
if num1 != num2:
return num1
return arry1[-1]
a = ("John", "Charles", "Mike")
b = ("Jenny", "Christy", "Monica")
x = zip(a, b)
print(tuple(x))
Reslult:
(('John', 'Jenny'), ('Charles', 'Christy'), ('Mike', 'Monica'))

--

--

--

Problem solver with experience in Software, and Mechanical engineering. Interested in web-dev, machine learning, artificial intelligence, and new technologies.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

HTML Basics Part II

O&O DiskImage 17.3 Build 447 Professional [Latest]

O&O DiskImage 17.3 Build 447 Professional [Latest]

Hydra system — Protect your Creativity

A Rosefinch By Any Other Name

How AWS is Powering Global Learning Management Systems

Checking BitTorrent in honor of the 20th anniversary. Time == quality

How to Host a Wordpress Site for $26.49

Lame HTB

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Avitosh Totaram

Avitosh Totaram

Problem solver with experience in Software, and Mechanical engineering. Interested in web-dev, machine learning, artificial intelligence, and new technologies.

More from Medium

Python Algorithms Every Programmer Should Know — Part 1

Code Optimizing: Smallest Possible Sum

Efficient backtracking in Python using monads

Find the Length of an Array in Python