Skip to content

Instantly share code, notes, and snippets.

View illuminatedspace's full-sized avatar
💭
Streaming work on i-s-term live on twitch.tv/illuminatedspace

Liz P. illuminatedspace

💭
Streaming work on i-s-term live on twitch.tv/illuminatedspace
View GitHub Profile

Graph Terminology

A graph consists of a set of vertices connected together by a set of edges. A tree is a special type of graph. In this example, a vertex is a node of that tree, and an edge is a link between a parent and one of it's children.

Prompt

Write a function that determines if a path exists between two vertices of a graph.

The graph will be represented as an object, each of whose keys represents a vertex of the graph and whose value represents all vertices that can be reached from the aforementioned key. In the example below, there is a connection from vertex a to vertex b and a connection from vertex b to vertices c and d but not a connection from vertex b to vertex a.

@illuminatedspace
illuminatedspace / SecretsContainer.jsx
Created March 11, 2017 23:56
Race Condition between Component render and Container Async Call
import React, { Component } from 'react'
import { connect } from 'react-redux'
import axios from 'axios'
// import { fetchNearby, fetchHere } from '../reducers/secret'
import Secrets from '../components/Secrets'
import Jokes from '../components/Jokes'
class SecretsContainer extends Component {