上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 27 下一页
摘要: Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to distribute these... 阅读全文
posted @ 2017-05-13 20:58 xiejunzhao 阅读(168) 评论(0) 推荐(0)
摘要: Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defined as the longest subsequence of one of these str... 阅读全文
posted @ 2017-05-02 23:52 xiejunzhao 阅读(127) 评论(0) 推荐(0)
摘要: In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data.You're given a matrix represented by a two-dimensi... 阅读全文
posted @ 2017-05-01 23:02 xiejunzhao 阅读(243) 评论(0) 推荐(0)
摘要: Total Accepted: 11103Total Submissions: 17987Difficulty: EasyContributors:joshpowellGiven a string, you need to reverse the order of characters in each word within a sentence while still preserving wh... 阅读全文
posted @ 2017-04-28 00:22 xiejunzhao 阅读(172) 评论(0) 推荐(0)
摘要: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as poss... 阅读全文
posted @ 2017-04-24 23:49 xiejunzhao 阅读(113) 评论(0) 推荐(0)
摘要: Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a2 ↘ c... 阅读全文
posted @ 2017-04-19 00:07 xiejunzhao 阅读(167) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Algorithm { class MyListNode { public T Key { get; set; } public MyListNode N... 阅读全文
posted @ 2017-04-17 23:44 xiejunzhao 阅读(312) 评论(0) 推荐(0)
摘要: Write a function to find the longest common prefix string amongst an array of strings.public class Solution { public string LongestCommonPrefix(string[] strs) { StringBuilder result = new StringBu... 阅读全文
posted @ 2017-04-16 00:12 xiejunzhao 阅读(177) 评论(0) 推荐(0)
摘要: Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".public class Solution { public string AddBinary(string a, string b) { int length = Math.Ma... 阅读全文
posted @ 2017-04-15 22:19 xiejunzhao 阅读(213) 评论(0) 推荐(0)
摘要: // #define USING_HASH_SET// ==++==// // Copyright (c) Microsoft Corporation. All rights reserved.// // ==--==/*============================================================**** Class: SortedSet****... 阅读全文
posted @ 2017-04-12 23:37 xiejunzhao 阅读(350) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 27 下一页