Skip to content

Instantly share code, notes, and snippets.

View jianminchen's full-sized avatar

Jianmin Chen jianminchen

View GitHub Profile
@jianminchen
jianminchen / Microsoft onsite procedure - survive to last round
Created August 31, 2018 20:27
Microsoft onsite procedure - last round to meet the manager
http://www.1point3acres.com/bbs/thread-440151-1-1.html
8/27 去的微软onsite。
游客,本帖隐藏的内容需要积分高于 160 才可浏览,您当前积分为 0。
查看如何攒积分 Click here for more info.
第一轮:. 牛人云集,一亩三分地
linkedlist vs array
kth largest, 我当时一听到这个词, 就开始激动,自己往quickSelect上靠,但其实面试官给的条件是两个sorted array的第k大,直接从尾端比大小往前移指针就好了。
parking lot
@jianminchen
jianminchen / 2476ClosestNodes.cs
Created November 8, 2023 02:43
2476 Closest nodes queries in a binary search tree - TLE error, tree's height is O(N), not O(logN). It is better to save in the array, and apply binary search
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _2476_closest_nodes
{
class Program
{
@jianminchen
jianminchen / 2049CountNodesWithHighestScore
Created October 31, 2023 00:03
2049 Count node with highest score
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _2049_count_nodes_with_the_highest_score
{
class Solution
{
@jianminchen
jianminchen / 282ExpressionAddOperators.cs
Created October 26, 2023 19:49
282 Expression Add operators - C# solution | DFS | * high precedence above +/- |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _282_expression_add_operators_III
{
class Program
{
@jianminchen
jianminchen / 536ConstructBinaryTreeFromString.cs
Created October 16, 2023 22:02
C# | Construct binary tree from string | Using stack | Ask questions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _536_quick_learner___stack
{
class Program
{
@jianminchen
jianminchen / 1547MinimumCut.cs
Created October 14, 2023 02:26
1547 Minimum cost to cut a stick - C# - extra requirement - find path as well
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _1547_minimum_cut
{
class Program
@jianminchen
jianminchen / 1361ValidateBinaryTreeNodes.cs
Created September 20, 2023 23:18
1361 validate binary tree nodes - C# solution
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _1361_Validate_binary_tree_nodes
{
class Program
{
@jianminchen
jianminchen / 1351ValidateBinaryTreeNodes.cs
Created September 20, 2023 20:04
1351 Validate binary tree nodes - C# solution
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _1361_Validate_binary_tree_nodes
{
class Program
{
@jianminchen
jianminchen / 536ConstructBinaryTreeFromString.cs
Created September 19, 2023 01:31
536 Construct binary tree from string - Sept. 18, 2023
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _536_constructBinaryTreeFromString
{
class Program
{
@jianminchen
jianminchen / 1902DepthOfBSTGivenInsertionOrder.cs
Created September 14, 2023 22:28
1902. Depth of BST Given Insertion Order | Time out TLE 65/70
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _1902_depthBSTGivenInsertionOrder
{
class Program
{