摘要:
Problem:This is afollow upofShortest Word Distance. The only difference is now you are given the list of words and your method will be calledrepeatedl... 阅读全文
摘要:
Problem:Given an array of meeting time intervals consisting of start and end times[[s1,e1],[s2,e2],...](si= min_heap.peek()) { min_heap.poll(); ... 阅读全文
摘要:
Problem:Given an array of meeting time intervals consisting of start and end times[[s1,e1],[s2,e2],...](si interval_sort = new Comparator() { @Over... 阅读全文
摘要:
Problem:A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down).Find all strobogrammatic numbers tha... 阅读全文
摘要:
Problem:There are a row ofnhouses, each house can be painted with one of thekcolors. The cost of painting each house with a certain color is different... 阅读全文
摘要:
Problem:There are a row ofnhouses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a ... 阅读全文
摘要:
Problem:Given a positive integern, find the least number of perfect square numbers (for example,1, 4, 9, 16, ...) which sum ton.For example, givenn=12... 阅读全文
摘要:
Problem:Given an array ofnintegersnumsand atarget, find the number of index tripletsi, j, kwith0 ret = new ArrayList (); ret.add(0); Ar... 阅读全文
摘要:
Problem:Givennnodes labeled from0ton - 1and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges m... 阅读全文
摘要:
Problem:Design an algorithm to encodea list of stringstoa string. The encoded string is then sent over the network and is decoded back to the original... 阅读全文