Skip to content

Instantly share code, notes, and snippets.

View pixelknitter's full-sized avatar
🍎
Fresh juice..

Eddie Freeman pixelknitter

🍎
Fresh juice..
View GitHub Profile
func longestSequence(_ A: [Int]) -> Int {
var adjacentCounts = [Int: Int]()
var max = 0
for index in 0..<A.count {
if adjacentCounts[index] != nil {
continue
}
var leftSide = adjacentCounts[index - 1] ?? 0
var rightSide = adjacentCounts[index + 1] ?? 0
adjacentCounts[index] = leftSide + rightSide + 1
import React, { Component } from 'react';
import { Text, View } from 'react-native';
import axios from 'axios';
import Product from '../../models/Product'
// Note the special import here!
interface ICardCollectionProps {
}