Skip to content

Instantly share code, notes, and snippets.

View David-Mimnagh's full-sized avatar

David Mimnagh David-Mimnagh

View GitHub Profile
move position 0 to position 3
rotate right 0 steps
rotate right 1 step
move position 1 to position 5
swap letter h with letter b
reverse positions 1 through 3
swap letter a with letter g
swap letter b with letter h
rotate based on position of letter c
swap letter d with letter c
@David-Mimnagh
David-Mimnagh / WeighterSystem.cs
Last active December 20, 2016 08:59
Character comparng weighting system
class Program
{
const int MAXWEIGHT = 100;
const int F_NAME_WEIGHT = 10;
const int S_NAME_WEIGHT = 30;
const int WP_REF_WEIGHT = 50;
const int FEE_REF_WEIGHT = 70;
const int NINO_WEIGHT = 100;
const int DOB_WEIGHT = 20;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace AdventOfCode_Day12
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace AdventOfCode_Day10
{
class Program
{
public class Bot
{
public int Low { get; set; }
public int High { get; set; }
public int DestLow {get;set;}
public int DestHigh {get;set;}
public int OutDestLow {get;set;}
public int OutDestHigh {get;set;}
public Bot(int low, int high)
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace AdventOfCode_Day10
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace AdventOfCode_Day10
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace AdventOfCode_Day10
{
class Program
{
static void Main(string[] args)
{
string path = "../../input.txt";
String input = File.ReadAllText(path);
Console.WriteLine(getLength(input));
Console.Read();
}
static long getLength(string input)
{
static void Main(string[] args)
{
string path = "../../input.txt";
String input = File.ReadAllText(path);
int i = 0;
while (i < input.Length)
{
if (input[i] != '(') { i++; continue; }
int length = Convert.ToInt32(input.Substring(i + 1, input.IndexOf('x', i) - i - 1));