Back to Browse

HackerRank - Pairs | Full solution with examples and visuals

12.2K views
Nov 16, 2020
14:14

Missing Numbers is a programming challenge on HackerRank. You are given an array of unique integers and a target value. You need to find out the number of pairs that can be formed from the elements of the array such that their difference is the target value. Watch the video to understand the problem in a simplified manner. I then work along with you to solve it first using a Brute Force approach, and then an efficient approach. All along with visuals and explanations. 00:00 - Intro 01:04 - Problem Statement and Test Case 03:54 - Brute Force Solution 06:52 - Efficient Solution 11:14 - Dry-run of code 13:38 - Final thoughts 📚 Links I talk about in the video: Actual problem on HackerRank: https://www.hackerrank.com/challenges/pairs/problem Code on Github: https://github.com/nikoo28/java-solutions/blob/master/src/main/java/hackerrank/algorithms/search/Pairs.java Test cases on GitHub: https://github.com/nikoo28/java-solutions/blob/master/src/test/java/hackerrank/algorithms/search/PairsTest.java 📘 A text based explanation is available at: https://studyalgorithms.com/array/hackerrank-pairs/ 🔗 To see more videos like this, you can show your support on: https://www.buymeacoffee.com/studyalgorithms 💻 Get Social 💻 Follow on Facebook at: https://www.facebook.com/studyalgos Follow on Twitter at: https://www.twitter.com/studyalgorithms Follow on Tumblr at: https://studyalgos.tumblr.com/ Subscribe to RSS feeds: https://studyalgorithms.com/feed/ Join fan mail: http://eepurl.com/g9Dadv #hackerrank #programming #tutorial

Download

1 formats

Video Formats

360pmp429.9 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

HackerRank - Pairs | Full solution with examples and visuals | NatokHD