This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"restaurants": [{ | |
"id": 1, | |
"name": "Mission Chinese Food", | |
"neighborhood": "Manhattan", | |
"photograph": "1.jpg", | |
"address": "171 E Broadway, New York, NY 10002", | |
"latlng": { | |
"lat": 40.713829, | |
"lng": -73.989667 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
'''Write a function: | |
def solution(A) | |
that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A. | |
For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5. | |
Given A = [1, 2, 3], the function should return 4. | |
Given A = [−1, −3], the function should return 1. |