Skip to content

Instantly share code, notes, and snippets.

View jianminchen's full-sized avatar

Jianmin Chen jianminchen

View GitHub Profile
@jianminchen
jianminchen / Leetcode742ClosestLeafInABinaryTree.cs
Last active September 13, 2023 02:27
742. Closest Leaf in a Binary Tree - practice with a test case
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _742_closest_leaf_in_a_binary_tree
{
class Program
@jianminchen
jianminchen / 425WordSquare.cs
Last active October 21, 2020 23:41
425 word square - C# code - Trie - I took time to figure out prefix.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _435_word_square
{
class Program
{
@jianminchen
jianminchen / Leetcode76_smallestSubstring_RemoveCharNotInArray.cs
Created September 26, 2017 21:58
Leetcode 76 - smallest substring - remove char not in the unique char array. The algorithm passes all test cases.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace substring_practice
{
// []'x','y','z'] - substring containing all characters