This file contains hidden or 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import json | |
from datetime import datetime | |
import requests | |
# Input data. Get the data from GRAPH API explorer. (https://developers.facebook.com/tools/explorer/?classic=1) | |
ACCESS_TOKEN="YOUR_GRAPH_API_TOKEN" | |
YEAR ="THE_YEAR_YOU_WANNA_CRAWL_THE_POSTS" |
This file contains hidden or 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. |
OlderNewer