摘要: /*Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots - th... 阅读全文
posted @ 2016-01-24 08:54 Hygeia 阅读(301) 评论(0) 推荐(0) 编辑
摘要: /*** Return the smallest character that is strictly larger than the search character,* If no such character exists, return the smallest character in t... 阅读全文
posted @ 2016-01-24 07:46 Hygeia 阅读(272) 评论(0) 推荐(0) 编辑
摘要: Given an array of positive integers. All numbers occur even number of times except one number which occurs odd number of times. Find the number in O(n... 阅读全文
posted @ 2016-01-24 05:44 Hygeia 阅读(276) 评论(0) 推荐(0) 编辑
摘要: This question was asked in the first coding round on-site.Give two sorted lists List a and List b.Findthe Union of these two lists -> the union list s... 阅读全文
posted @ 2016-01-24 05:30 Hygeia 阅读(283) 评论(0) 推荐(0) 编辑
摘要: There are 2 sorted sets.Find the common elements of those setse.g.A={1,2,3,4,5,6}B={5,6,7,8,9}o/p C={5,6}Complexity should ne 0(n+m) where n and m is ... 阅读全文
posted @ 2016-01-24 02:55 Hygeia 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Fill in the following methods:public interface PointsOnAPlane { /** * Stores a given point in an internal data structure */ void addPoin... 阅读全文
posted @ 2016-01-24 02:39 Hygeia 阅读(247) 评论(0) 推荐(0) 编辑
摘要: public interface InfluencerFinder {/*** Given a matrix of following between N LinkedIn users (with ids from 0 to N-1):* followingMatrix[i][j] == true ... 阅读全文
posted @ 2016-01-24 01:27 Hygeia 阅读(326) 评论(0) 推荐(0) 编辑
摘要: Given a list of tuples representing intervals, return the range these intervalscovered.e.g:[(1,3), (2,5),(8,9)] should return 5和 merge interval非常类似pub... 阅读全文
posted @ 2016-01-24 01:13 Hygeia 阅读(220) 评论(0) 推荐(0) 编辑