2013年11月7日

Anagrams

摘要: Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.Solution andPrecautions:First, note what is Anagrams, you can google search it and let’s claim that wordAandBis called anagram to each other if we can get word B(A) from A(B) by rearrangi 阅读全文

posted @ 2013-11-07 13:23 Step-BY-Step 阅读(272) 评论(0) 推荐(0) 编辑

Permutations II

摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the following unique perm... 阅读全文

posted @ 2013-11-07 12:53 Step-BY-Step 阅读(168) 评论(0) 推荐(0) 编辑

Minimum Window Substring

摘要: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S="ADOBECODEBANC"T="ABC"Minimum window is"BANC".Note:If there is no such window in S that covers all characters in T, return the emtpy 阅读全文

posted @ 2013-11-07 10:09 Step-BY-Step 阅读(208) 评论(0) 推荐(0) 编辑

工厂模式

摘要: 工厂模式定义:实例化对象,用工厂方法代替new操作。工厂模式是我们最常用的模式了,著名的Jive论坛 ,就大量使用了工厂模式,工厂模式在Java程序系统可以说是随处可见。因为工厂模式就相当于创建实例对象的new,我们经常要根据类Class生成实例对象,如A a=new A() 工厂模式也是用来创建实例对象的,所以以后new时就要多个心眼,是否可以考虑使用工厂模式,虽然这样做,可能多做一些工作,但会给你系统带来更大的可扩展性和尽量少的修改量。1编程开发工厂模式定义我们以类Sample为例, 如果我们要创建Sample的实例对象:Sample* sample=new Sample();可是,实际情 阅读全文

posted @ 2013-11-07 02:08 Step-BY-Step 阅读(227) 评论(0) 推荐(0) 编辑

How do you design object oriented projects?

摘要: what are things you do during the high level design phase (before you begin programming) to determine what are the classes you need (especially ones not based on any 'real world objects') and how will they interact with each other?The steps that I use for initial design (getting to a class d 阅读全文

posted @ 2013-11-07 01:15 Step-BY-Step 阅读(148) 评论(0) 推荐(0) 编辑

What is Object Oriented Design? (OOD)

摘要: Object Oriented Design is the concept that forces programmers to plan out their code in order to have a better flowing program. The origins of object oriented design is debated, but the first languages that supported it included Simula and SmallTalk. The term did not become popular until Grady Booch 阅读全文

posted @ 2013-11-07 01:00 Step-BY-Step 阅读(332) 评论(0) 推荐(0) 编辑

导航