自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 Maze problem 的OO Design - 写给煜小堆

Question: How do you design a Maze and what kind of data structures you use for Maze. In addition, write a method to print the shorted path from start to end point.Example:#############

2016-02-28 12:35:08 491

原创 Two Sum Closest to K

An Array of integers is given, both +ve and -ve. You need to find the two elements such that their sum is closest to target.public static int[] findTwoSumClosest(int[] num, int target) { if(nu

2015-01-31 05:47:10 567

原创 Design a valet parking system.

Design a valet parking system. Requirements of the valet parking system should be: 1. Customer are given a ticket that they can use to redeem to get their vehicle back 2. Parking spots come in thr

2015-01-30 08:11:59 592

原创 OOD - Arithmetic Expression Tree

package OO_Problems;public class ArithmeticExpressionTree { public interface AENode{ public double evaluate() throws EvaluationException; } public class AEValueNode implements AENode{ priva

2015-01-26 16:01:19 580

原创 这两道题的区别 LeetCode Permutations 和 LeetCode Combinations

刷第一遍的时候觉得这两道题巨尼玛像,但是为啥一个用了isVisited boolean数组,一个就是正常iterate。刷第二遍的时候终于醒悟了:1,Permutation - Order Matters!!!!!要回溯,[1,4] 出现了之后,还想要[4,1], 所以要判断是否有被visithttps://oj.leetcode.com/problems/permutat

2015-01-20 06:49:15 1001

原创 Remove Node in Binary Search Tree

This is one of the pretty interesting technical interview questions I see, it is rather fundamental, you probably have seen similar from your text book. But you know what, in the real interview proces

2015-01-20 05:49:40 1253

原创 How to compare 2 arrays in java

// we need to import java.util.Arrays to use Arrays.equals().import java.util.Arrays;class Test{ public static void main (String[] args) { int arr1[] = {1, 2, 3}; int arr2[

2015-01-02 14:04:42 592

原创 Lowest Common Ancestor (LCA) of two nodes in graph

In graph theory and computer science, the lowest common ancestor (LCA) of two nodes v and w in a tree or directed acyclic graph (DAG) is the lowest (i.e. deepest) node that has both v and w

2014-12-30 14:01:28 750

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除