Open in app
Carlos Ruiz Agular
10 Followers
About

Sign in

10 Followers
About
Open in app
Carlos Ruiz Agular

Carlos Ruiz Agular

Feb 6, 2020·1 min read

One of the optimal solutions is to use a Map where you do O(n) to populate de map – then you iterate over second array and find if any element exist … In theory maps have no access O(1) guaranteed but I’m practice you can assume that leaving your best case to O(n)

Carlos Ruiz Agular

Coffee lover (serious espresso drinker)

Algorithm practice: Find common elements in two arrays
202
6

John Fajardo

More from Carlos Ruiz Agular

Coffee lover (serious espresso drinker)

More From Medium

Building a demo application and deploying it in AWS

Carlos Ruiz Agular

The Fate Of Elon Musk’s Assistant Is A Cautionary Tale For Negotiating Salary

Nick Wolny in Entrepreneur's Handbook

How the Most Dangerous Study of All Time Changed What We Know About Weight Loss

Michael Easter

How to Do 50 Things

Sophie Lucido Johnson in Forge

Stuck at Home, I Started Dating My Roommate

Mana Gale in The Bold Italic

What’s New in Flutter 2.0

Chris Sells in Flutter

A Psychological Trick to Evoke An Interesting Conversation

Minarella in Mind Cafe

7 Little Things That Can Tell You A Lot About Someone

Anthony J. Yeung in Mind Cafe

About

Help

Legal

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