DEnjoy

µ¼º½

2016Äê11ÔÂ1ÈÕ #

leetcodeÈÕ¼Ç Combination sum IV

ÕªÒª£º ÌâÄ¿£º Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer tar ÔĶÁÈ«ÎÄ

posted @ 2016-11-01 20:47 DEnjoy ÔĶÁ(139) ÆÀÂÛ(0) ÍƼö(0) ±à¼­

2016Äê10ÔÂ25ÈÕ #

¶þ½øÖÆÒì»òÔËËãµÄÓ¦ÓÃ

ÕªÒª£º Òì»òÔËËãÓÖ³ÆXOR»òEOR ¶þ½øÖÆÖÐΪ¶ÔӦλ½øÐÐÔËË㣬ÈôÏàͬÔòΪ0£¬²»Í¬ÔòΪ1. ¼òµ¥ÐÔÖÊ£º Ó¦ÓÃ1£ºÅжÏÁ½¸öÊýÊÇ·ñÏàµÈ ¸ù¾ÝÒì»òÔËËãµÄ¶¨Ò壬µ±Á½¸öÊýÏàͬʱ£¬ÔËËã½á¹ûΪ0 Ó¦ÓÃ2£ºÍ¨¹ýÒì»òÔËË㽫Öظ´µÄÁ½¸öÊýÈ¥³ý¡£ Àý£ºhttps://leetcode.com/problems/single-numb ÔĶÁÈ«ÎÄ

posted @ 2016-10-25 17:34 DEnjoy ÔĶÁ(763) ÆÀÂÛ(0) ÍƼö(0) ±à¼­

2016Äê9ÔÂ18ÈÕ #

pytho¼òµ¥ÅÀ³æ_Ä£ÄâµÇ½Î÷µçÁ÷Á¿²éѯ_ʵÏÖÒ»¼ü²éѯ×Ô¼ºµÄУ԰ÍøÁ÷Á¿

ÕªÒª£º ÏÐÀ´ÎÞÊ£¬ÓÉÓÚУ԰ÄÚÍøÂçÊÇÏÞÁ÷Á¿µÄ£¬²éѯÁ÷Á¿ºÜÊÇƵ·±£¬ÓÚÊÇÃÈÉúÁËдһ¸ö±¾µØ½Å±¾½øÐÐÒ»¼ü²éѯ×Ô¼ºµÄÊ£ÓàÁ÷Á¿¡£ Õû¸ö²¿·Ö¿ÉÒÔ·ÖΪÈý¸ö¹ý³Ì½øÐУº µÚÒ»²¿·Ö£º¶ÔµÇ½ʱhttpЭÒé½øÐзÖÎö Ä£Äâä¯ÀÀÆ÷½øÐеǽ£¬ÄÇô¾ÍÐèÒªÖªµÀµ±ä¯ÀÀÆ÷½øÐеǽʱ·¢ÉúÁËʲôÊÂÇé¡£¶Ô´Ë¿ÉÒԲμûÏÂÃæÕâÕÅ×ÔÖƵÄͼ£¬ËüչʾÁËÒ»´Îä¯ÀÀÆ÷·ÃÎÊ ÔĶÁÈ«ÎÄ

posted @ 2016-09-18 16:23 DEnjoy ÔĶÁ(3022) ÆÀÂÛ(3) ÍƼö(0) ±à¼­

2016Äê8ÔÂ23ÈÕ #

leetcode ÈÕ¼Ç 162. Find Peak Element java python

ÕªÒª£º ¸ù¾ÝÌâÄ¿¿ÉÖª£¬ÊäÈëΪ:Ò»¸öÏàÁÚÔªËز»ÏàµÈµÄÊýÁУ¬Êä³öΪ:ÆäÖÐÒ»¸ö£¨ÉÏ£©·åÖµµÄÐòºÅ¡£²¢ÇÒÒªÇóʱ¼ä¸´ÔÓ¶ÈΪlogn ·ÖÎö£ºÓÉÓÚÌâÄ¿ÒªÇóʱ¼ä¸´ÔÓ¶ÈΪlogn£¬Òò´Ë²»ÄܽøÐÐÈ«²¿±éÀú¡£ÓÖÒòΪֻÐèÒªÕÒµ½ÆäÖеÄÒ»¸ö·åÖµ£¬ÄÇô£¬Ã¿´Î¶Ô°ë·Ö£¬±ã¿ÉÒÔ´ïµ½lognµÄ¸´ÔӶȡ£ ¸ù¾Ý¶Ô°ë·ÖµÄ˼·¼ÌÐøÏ룬²»ÄÑ·¢ÏÖֻҪȷ¶¨ÁËÖмä ÔĶÁÈ«ÎÄ

posted @ 2016-08-23 18:02 DEnjoy ÔĶÁ(572) ÆÀÂÛ(0) ÍƼö(0) ±à¼­

2016Äê7ÔÂ23ÈÕ #

leetcode ÈÕ¼Ç 4sum java

ÕªÒª£º ÕûÌå˼·֮ͬǰµÄÒ»Ñù£¬ÒÀÈ»²ÉÈ¡½µµÍά¶ÈµÄ·½Ê½½øÐÐ ÕûÌåËÙ¶ÈÔÚleetcodeÉÏ´ó¸ÅΪ50% ÔĶÁÈ«ÎÄ

posted @ 2016-07-23 11:07 DEnjoy ÔĶÁ(162) ÆÀÂÛ(0) ÍƼö(0) ±à¼­

2016Äê7ÔÂ20ÈÕ #

leetcode ÈÕ¼Ç 3sumclosest java

ÕªÒª£º ˼·һΪ±éÀú£º ÕûÌå˼·¶þΪ½«threeSum½«ÎªtwoSum¼´¿É ±¾ÖÊÉϽ²Á½ÖÖ˼·ûÓÐÇø±ð ÔĶÁÈ«ÎÄ

posted @ 2016-07-20 17:42 DEnjoy ÔĶÁ(194) ÆÀÂÛ(0) ÍƼö(0) ±à¼­

2016Äê5ÔÂ10ÈÕ #

python leetcode ÈÕ¼Ç--Maximal Square--221

ÕªÒª£º ÌâÄ¿£º Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the following ÔĶÁÈ«ÎÄ

posted @ 2016-05-10 23:08 DEnjoy ÔĶÁ(556) ÆÀÂÛ(0) ÍƼö(0) ±à¼­

2016Äê5ÔÂ7ÈÕ #

python leetcode ÈÕ¼Ç--231. Power of Two

ÕªÒª£º ÌâÄ¿: Given an integer, write a function to determine if it is a power of two. ·½·¨£º·ÖÎö2µÄÃݴη½µÄÌص㣬·¢ÏÖ2µÄÈa56爆大奖在线娱乐â´Î·½µÄÊý£¬»¯³É¶þ½øÖÆʱֻÓÐÊ×λΪ1ÆäÓàλΪ0£¬Òò´Ëa56爆大奖在线娱乐µÄ½â¾ö·½·¨ÈçÏ£º binº¯ÊýÄܽ«Ò»¸ö¸ø¶¨µÄÊý»¯³É¶þ½øÖÆ ÔĶÁÈ«ÎÄ

posted @ 2016-05-07 18:55 DEnjoy ÔĶÁ(186) ÆÀÂÛ(0) ÍƼö(0) ±à¼­

2016Äê3ÔÂ28ÈÕ #

python leetcode ÈÕ¼Ç --Contains Duplicate --217

ÕªÒª£º ÌâÄ¿ Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the ÔĶÁÈ«ÎÄ

posted @ 2016-03-28 21:17 DEnjoy ÔĶÁ(181) ÆÀÂÛ(0) ÍƼö(0) ±à¼­

2016Äê3ÔÂ14ÈÕ #

python leetcode ÈÕ¼Ç --Contains Duplicate II --219

ÕªÒª£º ÌâÄ¿£º 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 ÔĶÁÈ«ÎÄ

posted @ 2016-03-14 20:04 DEnjoy ÔĶÁ(307) ÆÀÂÛ(0) ÍƼö(0) ±à¼­