码迷,mamicode.com
首页 >  
搜索关键字:example    ( 17798个结果
【LeetCode】Rotate List
Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.start...
分类:其他好文   时间:2014-05-19 16:25:44    阅读次数:234
汇编语言-求分段函数值
计算函数值题目:计算给定函数值要求:编制程序,计算下面函数值 其中,从键盘输入x,y,输出数据为a。输入输出时候都要求有提示信息。考查知识点:分支结构的应用。代码如下: 1 ; Example assembly language program -- 2 ; Author: karllen 3 .....
分类:编程语言   时间:2014-05-19 16:11:03    阅读次数:426
【LeetCode】Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".public class Solution { public String addBin...
分类:其他好文   时间:2014-05-19 12:15:49    阅读次数:220
LeetCode: Remove Nth Node From End of List [019]
【题目】 Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the linked list becomes 1->2->3->5. Note: Given n will ...
分类:其他好文   时间:2014-05-18 18:48:03    阅读次数:269
LeetCode: Remove Duplicates from Sorted Array [025]
【题目】 Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place with constant memory. For example, Given input array A ...
分类:其他好文   时间:2014-05-18 18:25:19    阅读次数:272
LeetCode 016 3Sum Closest
【题目】 Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution. For example, given array S = {...
分类:其他好文   时间:2014-05-18 10:37:57    阅读次数:269
LeetCode: Generate Parentheses [021]
【题目】 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(())", "()()()" 【题意】 给定n对括号,输出所有可行的括号组合字符串。所谓合法,就是可以Valid Pare...
分类:其他好文   时间:2014-05-18 09:06:41    阅读次数:266
LeetCode: Swap Nodes in Pairs [023]
【题目】 Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant space. You may not modify the values in the list, only nodes it...
分类:其他好文   时间:2014-05-18 08:37:57    阅读次数:370
javascript异步延时加载及判断是否已加载js/css文件
/**=========================================** | 异步延时加载js/css文件 | @example loadasync("http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"); | @author liuensong@gmail.com | @param stri...
分类:编程语言   时间:2014-05-18 06:16:24    阅读次数:299
LeetCode:Reverse Words in a String
题目: Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Clarification: What constitutes a word? A sequence of non-spa...
分类:其他好文   时间:2014-05-18 04:12:07    阅读次数:198
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!