Amazon Coding Interview Question: First Missing Positive (Java Solution)

Publié le: 19 juin 2020
sur la chaîne: Daily Coding Problem
205
4

Amazon Coding Interview Question: First Missing Positive (Java Solution)

Not employed by dailycodingproblem.com, just a fan.

You can (and should) sign up to receive an email with a coding problem everyday here: https://www.dailycodingproblem.com

You can subscribe to my channel here:    / @dailycodingproblem8346  

Daily Coding Problem: Problem #4 [Hard]
Good morning! Here's your coding interview problem for today.

This problem was asked by Stripe.

Given an array of integers, find the first missing positive integer in linear time and constant space. In other words, find the lowest positive integer that does not exist in the array. The array can contain duplicates and negative numbers as well.

For example, the input [3, 4, -1, 1] should give 2. The input [1, 2, 0] should give 3.

You can modify the input array in-place.

Solution is optimized (runs in linear time and constant space)


Sur cette page du site, vous pouvez voir la vidéo en ligne Amazon Coding Interview Question: First Missing Positive (Java Solution) durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Daily Coding Problem 19 juin 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 205 fois et il a aimé 4 téléspectateurs. Bon visionnage!