摘要:
原题 Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Her 阅读全文
摘要:
原题 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have 阅读全文
摘要:
原题 Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to 阅读全文
摘要:
直接选择、插入排序 直接选择排序和直接插入排序类似,都将数据分为有序区和无序区,所不同的是直接插入排序是将无序区的第一个元素直接插入到有序区以形成一个更大的有序区,而直接选择排序是从无序区选一个最小的元素直接放到有序区的最后。 冒泡排序 通过交换使相邻的两个数变成小数在前大数在后,这样每次遍历后,最 阅读全文
摘要:
原题 Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. For example, given n = 阅读全文
摘要:
原题 You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you 阅读全文
摘要:
原题 Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the h 阅读全文
摘要:
原题 A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. T 阅读全文
摘要:
一、简介 AJAX 即 “Asynchronous Javascript And XML”,是指一种创建交互式网页应用的网页开发技术。 AJAX = 异步 JavaScript 和 XML(标准通用标记语言的子集)。 AJAX不是一种新的编程语言,而是一种用于创建更好更快以及交互性更强的Web应用程 阅读全文
摘要:
http://www.lintcode.com/zh-cn/problem/next-permutation-ii/# 原题 给定一个若干整数的排列,给出按正数大小进行字典序从小到大排序后的下一个排列。 如果没有下一个排列,则输出字典序最小的序列。 样例 左边是原始排列,右边是对应的下一个排列。 1 阅读全文