Skip to content

Instantly share code, notes, and snippets.

View Jkudjo's full-sized avatar
🎯
Focusing

Philip Kumah JR (I) Jkudjo

🎯
Focusing
View GitHub Profile
{
"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
@Jkudjo
Jkudjo / solved_code.py
Created June 25, 2022 09:59 — forked from jinhoyoo/solved_code.py
Given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A.
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.