Skip to content

Instantly share code, notes, and snippets.

View kostrse's full-sized avatar

Sergey Kostrukov kostrse

View GitHub Profile
@kostrse
kostrse / queens.cs
Last active August 29, 2015 14:04
Queens Puzzle
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Algorithms.Maths
{
public struct Queen
{
@kostrse
kostrse / hashcode.cs
Last active August 29, 2015 14:03
GetHashCode for Strings
public static class StringHashCodeExtensions
{
public static int GetHashCodeJava(this string value)
{
if (value == null)
throw new ArgumentNullException("value");
int hashCode = 0;
for (int i = 0; i < value.Length; i++)