摘要: https://leetcode.com/problems/the-maze-ii/?tab=Description Thought: - BFS: It's looking for shortest distance, the initial thought is that BFS could b 阅读全文
posted @ 2017-03-11 07:13 fifi努刷题 阅读(343) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/the-maze/?tab=Description Thought: It only asks to return a boolean value of whether the ball can roll to destination; O 阅读全文
posted @ 2017-03-11 07:04 fifi努刷题 阅读(330) 评论(0) 推荐(0) 编辑
摘要: Given a permutation which contains no repeated number, find its index in all the permutations of these numbers, which are ordered in lexicographical o... 阅读全文
posted @ 2015-11-25 09:19 fifi努刷题 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Given an array of n integer, and a moving window(size k), move the window at each iteration from the start of the array, find the median of the elemen... 阅读全文
posted @ 2015-11-20 03:53 fifi努刷题 阅读(1064) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers and a numberk, find knon-overlappingsubarrays which have the largest sum.The number in each subarray should becontiguous.Re... 阅读全文
posted @ 2015-11-19 03:59 fifi努刷题 阅读(355) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/bulls-and-cows/Examples:Secret: 1807 Secret: 1123Guess: 7810 ====> "0A3B" Guess: 0111 ===... 阅读全文
posted @ 2015-11-04 05:06 fifi努刷题 阅读(283) 评论(0) 推荐(0) 编辑
摘要: https://www.hackerrank.com/challenges/taum-and-bdayProblem StatementTaum is planning to celebrate the birthday of his friend, Diksha. There are two ty... 阅读全文
posted @ 2015-10-29 09:01 fifi努刷题 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 1. First level Cache--Session.Querying of same object multiple times within a same session will only call DB for once, the rest of times will use cach... 阅读全文
posted @ 2015-10-27 14:37 fifi努刷题 阅读(152) 评论(0) 推荐(0) 编辑
摘要: What's 1+N problem?When you are querying for one table, it auto calls sql command for each relational database if the fetch type is eager.In such case... 阅读全文
posted @ 2015-10-27 07:26 fifi努刷题 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 1.Annotation@Entitypublic class Teacher { private String name; private int id; private Set students; @ManyToMany @JoinTable(name="t_s",... 阅读全文
posted @ 2015-10-26 10:06 fifi努刷题 阅读(151) 评论(0) 推荐(0) 编辑