View backtracking.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RatInMaze | |
{ | |
public int[,] board; | |
public int[,] sol; | |
public int desx; | |
public int desy; | |
public int N { get; set; } |
View LRU.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace DS | |
{ | |
public class LRU | |
{ |
View DP.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int[] p = { 1, 5, 8, 9, 10, 17, 17, 20 }; | |
static int N = p.Length; | |
static int[,] cache = new int[N, N]; | |
static int[] mem = new int[N + 1]; | |
public static int Max(int a, int b) | |
{ | |
return a > b ? a : b; | |
} |
View Edge.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Programming.WeightedUndirected | |
{ | |
public class Edge : IComparable<Edge> | |
{ |
View DirectedEdge.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace Programming.WeightedDirected | |
{ | |
public class EdgeWeightedDigraph | |
{ | |
private readonly int _v; |
View UnweightedUndirected.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace Programming.Data_Structures | |
{ | |
public class Graph | |
{ | |
public readonly int _V; |
View unionfind.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace Programming.Data_Structures.Union_Find | |
{ | |
public class UF | |
{ | |
public int[] id { get; set; } |
View TRIE.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace Programming.Data_Structures.Trie | |
{ | |
public static class TrieExtension | |
{ | |
public static int AlphabetSize = 26; |