scala ide + helloworld

http://blog.csdn.net/asongoficeandfire/article/details/21490101 简介 在上一篇文章中,我们阐述了Coursera使用Scala的理由,以及Scala的优缺点。说多不如少练,我们今天就开始练习如何使用Scala编程。...

2015-11-13 12:37:59

阅读数:587

评论数:0

Sliding Window Maximum

题目: Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see...

2015-10-18 21:02:59

阅读数:471

评论数:0

Next Permutation

题目: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement ...

2015-10-18 16:22:21

阅读数:433

评论数:0

Game of Life

题目: According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British ma...

2015-10-18 13:38:15

阅读数:463

评论数:0

Median of Two Sorted Arrays

题目: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time compl...

2015-10-13 14:06:41

阅读数:464

评论数:0

Word Pattern

题目: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection ...

2015-10-13 13:58:11

阅读数:309

评论数:0

Nim Game

题意: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1...

2015-10-13 13:20:51

阅读数:403

评论数:0

B树、B-树、B+树、B*树

http://www.cnblogs.com/oldhorse/archive/2009/11/16/1604009.html B树        即二叉搜索树:        1.所有非叶子结点至多拥有两个儿子(Left和Right);        2.所有结点存储...

2015-10-09 10:04:58

阅读数:402

评论数:0

Permutation Sequence

题目: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, We get the followin...

2015-10-03 20:11:07

阅读数:326

评论数:0

Merge Intervals

题目: Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[1...

2015-10-03 16:27:17

阅读数:298

评论数:0

Insert Interval

题目: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the interval...

2015-10-03 16:15:56

阅读数:335

评论数:0

Combination Sum III

题目: Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combinatio...

2015-10-03 15:59:47

阅读数:293

评论数:0

Count Complete Tree Nodes

题目: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia: In a complete binary tree ...

2015-10-03 15:52:46

阅读数:443

评论数:0

Restore IP Addresses

题目: Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given "2552...

2015-10-03 15:40:03

阅读数:328

评论数:0

Best Time to Buy and Sell Stock IV

题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. Y...

2015-10-03 15:26:59

阅读数:632

评论数:0

Best Time to Buy and Sell Stock III

题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. Y...

2015-10-03 15:11:04

阅读数:316

评论数:0

Search for a Range

题目: Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must...

2015-10-03 14:54:08

阅读数:284

评论数:0

Longest Consecutive Sequence

题目: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3...

2015-10-03 14:24:50

阅读数:294

评论数:0

Majority Element II

题目: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1)...

2015-10-03 14:13:35

阅读数:304

评论数:0

Binary Tree Zigzag Level Order Traversal

题目: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next le...

2015-10-03 13:48:43

阅读数:232

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭