摘要:
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j]and the d 阅读全文
posted @ 2016-10-26 08:37
微微程序媛
阅读(156)
评论(0)
推荐(0)
摘要:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet 阅读全文
posted @ 2016-10-26 06:45
微微程序媛
阅读(94)
评论(0)
推荐(0)
摘要:
Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical a 阅读全文
posted @ 2016-10-26 05:47
微微程序媛
阅读(126)
评论(0)
推荐(0)
摘要:
import java.util.*; class Node{ String val; Set children = new HashSet(); // at most 15 children; public Node(String val){ this.val = val; this.children = new HashSet(); ... 阅读全文
posted @ 2016-10-26 04:01
微微程序媛
阅读(268)
评论(0)
推荐(0)
摘要:
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the 阅读全文
posted @ 2016-10-26 03:57
微微程序媛
阅读(558)
评论(0)
推荐(0)
摘要:
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. 阅读全文
posted @ 2016-10-26 00:42
微微程序媛
阅读(155)
评论(0)
推荐(0)
摘要:
You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2016-10-26 00:20
微微程序媛
阅读(122)
评论(0)
推荐(0)

浙公网安备 33010602011771号