mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[LeetCode] Problem 961 - N-Repeated Element in Size 2N Array

Posted on 2019-02-26 | In Algorithm , LeetCode
In a array A of size 2N, there are N+1 unique elements, and exactly one of these elements is repeated N times. Return the element repeated N times. Ex ...
Read more »

[LeetCode] Problem 804 - Unique Morse Code Words

Posted on 2019-02-25 | In Algorithm , LeetCode
International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: “a” maps to “.-“, “b” map ...
Read more »

[LeetCode] Problem 709 - To Lower Case

Posted on 2019-02-25 | In Algorithm , LeetCode
Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. ExampleNo.1Input: “Hello” Output: “hello” ...
Read more »

[LeetCode] Problem 929 - Unique Email Addresses

Posted on 2019-02-25 | In Algorithm , LeetCode
Every email consists of a local name and a domain name, separated by the @ sign. For example, in alice@leetcode.com, alice is the local name, and leet ...
Read more »

[LeetCode] Problem 295 - Find Median from Data Stream

Posted on 2019-02-25 | In Algorithm , LeetCode
Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two ...
Read more »

[LeetCode] Problem 17 - Letter Combinations of a Phone Number

Posted on 2019-02-24 | In Algorithm , LeetCode
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to le ...
Read more »

[LeetCode] Problem 771 - Jewels and Stones

Posted on 2019-02-20 | In Algorithm , LeetCode
You’re given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of sto ...
Read more »

clone方法和java.lang.Cloneable接口

Posted on 2019-02-19 | In Java
Java语言准备了用于复制实例的clone方法。要想调用clone方法,被复制对象的类必须实现java.lang.Cloneable接口,不论是被复制对象的类实现java.lang.Cloneable接口还是其某个父类实现Cloneable接口,亦或是被复制对象的类实现了Cloneable接口的子接 ...
Read more »

【图解设计模式】Prototype模式

Posted on 2019-02-18 | In Design Pattern
不根据类来生成实例,而是根据实例来生成新实例。 在开发过程中,有时候也会有“在不指定类名的前提下生成实例”的需求。例如,在以下情况下,就不能根据类来生成实例,而要根据现有的实例来生成新的实例。 (1) 对象种类繁多,无法将它们整合到一个类中时(2) 难以根据类生成实例时(3) 想解耦框架与生成的实例 ...
Read more »

java.util.concurrent包和Active Object模式

Posted on 2019-02-16 | In Multithread
类图 Main.java1234567891011121314151617181920import activeobject.ActiveObject;import activeobject.ActiveObjectFactory;public class Main { public ...
Read more »
1…596061…78
mrlonelyjtr

mrlonelyjtr

间歇性踌躇满志,持续性混吃等死

780 posts
18 categories
18 tags
Github
© 2020 mrlonelyjtr
Powered by Hexo
Theme - NexT.Pisces