-
Recent Posts
Recent Comments
Archives
Categories
Meta
Author Archives: Hieu Nguyen
System Design Tools and Templates
Tools Draw.io Visual paradigm Lucid chart 2. Templates Problem Statement Scope Design Goals Assumptions High Level Design Challenges Open Items References
Posted in system design
Comments Off on System Design Tools and Templates
Interview Resources
Pramp BigOCheatSheet Hackerrank Interviewing.io Grokking the system design interview Cracking the coding interview Leetcode
Posted in resources
Comments Off on Interview Resources
common git problems
Delete the remote branch git push -d origin <branch_name> Delete the local branch git branch -D <branch_name> Merge master into feature branch git checkout master git pull git checkout feature git merge master Checkout from a specific commit Use git checkout … Continue reading
Posted in git
Comments Off on common git problems
longest-substring-without-duplicate-characters
public class LengthOfLongestSubstring { public static int lengthOfLongestSubstring(String s) { if (s == null) { return 0; } Map<Character, Integer> map = new HashMap<>(); int maxLength = 0; int start = 0; for (int i = 0; i < s.length(); … Continue reading
Posted in hashtable
Comments Off on longest-substring-without-duplicate-characters
sorted-square
public class SortedSquare { public static int[] sortedSquare(int[] nums) { int[] result = new int[nums.length]; int writeIndex = nums.length – 1; int l = 0, r = nums.length – 1; while (l <= r) { if (nums[l] * nums[l] < … Continue reading
Posted in sorting
Comments Off on sorted-square
sum-of-left-leaves
package us.inest.app.dcp.recursion; import us.inest.app.dcp.tree.TreeNode; public class SumOfLeftLeaves { public static int sumOfLeftLeaves(TreeNode root) { // base case if (root == null) { return 0; } // left child is a leaf node if (root.left != null && root.left.left == null … Continue reading
Posted in recursion
Comments Off on sum-of-left-leaves
remove-nth-node-from-end-of-list
LeetCode link: https://leetcode.com/problems/remove-nth-node-from-end-of-list/submissions/684704570/ Java Solution
Posted in singly-linked list
Comments Off on remove-nth-node-from-end-of-list