Skip to content

Instantly share code, notes, and snippets.

View iterativo's full-sized avatar

Rafael Torres iterativo

View GitHub Profile
@iterativo
iterativo / find-city.js
Created February 17, 2020 00:33
Shortest Path via the Floyd-Marshall algorithm
/**************************************************************************************************************
* *
* The Floyd-Marshall algorithm: *
* https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm *
* *
* This file presents a solution to this problem: *
* https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/ *
* *
**************************************************************************************************************/
@iterativo
iterativo / StringPermutationUsingRecursion.cs
Last active August 29, 2015 14:26
String Permutation in C#
using static System.Console;
public class StringPermuter
{
private string _word;
public StringPermuter(string word)
{
_word = word;
}
@iterativo
iterativo / BinaryTreeTraversal.cs
Last active August 29, 2015 14:26
Binary Tree Breath-first vs Depth-first Traversal
using System;
using System.Linq;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
BTTraversal();
}
@iterativo
iterativo / gist:9b6555ba6c52072a35b7
Created May 12, 2015 03:25
Working With StructureMap 3 Profiles
interface ICar { }
public class Brandless : ICar { }
public class Honda : ICar { }
public class Toyota : ICar { }
[TestFixture]
public class WorkingWithProfiles
{
[Test]