最近复习考研,加上一直都将"算法"放在很高的位置,所以,蛮重视算法的.不多说了,其实这个问题,不难理解的.主要代码: 1 //反转单链表. 2 void 3 reverse(linklist lList) { 4 Linknode *pre = NULL; //注意该结点不能再指向别的...
分类:
其他好文 时间:
2014-09-12 01:11:24
阅读次数:
221
仅提供个人的一种解题思路,未必是最优,仅供各位参考!
import java.util.Stack;
/**
*
*
* ClassName SolutionEvaluateReversePolishNotation
*
*
* Description 该题是解逆波兰表达式 Evaluate the value of an arithmetic expression i...
分类:
其他好文 时间:
2014-09-11 22:29:42
阅读次数:
257
【题目】
Clone an undirected graph. Each node in the graph contains a label and
a list of its neighbors.
OJ's undirected graph serialization:
Nodes are labeled uniquely.
We use # as a separa...
分类:
其他好文 时间:
2014-09-11 22:29:02
阅读次数:
223
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321 1 public class Solution { 2 public int reverse(int x) { 3 ...
分类:
其他好文 时间:
2014-09-11 20:48:02
阅读次数:
223
Problem 1:vector coll = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };vector::const_iterator pos = find (coll.cbegin(), coll.cend(),5);cout ::const_reverse_iterator r...
分类:
其他好文 时间:
2014-09-11 18:56:12
阅读次数:
226
仅提供个人的一种解题思路,未必是最优,仅供各位参考!...
分类:
其他好文 时间:
2014-09-11 17:18:52
阅读次数:
180
1.数组函数//作用:提供了很多官方写的很多有用的代码段,提高编写速度1)数组的键值操作函数array_values();//获取数组中的值array_keys();//获取数组中的键in_array();//检查一个值是否在数组中array_flip();//键和值对调array_reverse(...
分类:
Web程序 时间:
2014-09-11 09:37:51
阅读次数:
310
Evaluate Reverse Polish NotationEvaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may ...
分类:
其他好文 时间:
2014-09-10 14:09:30
阅读次数:
182
[leetcode]Reverse Linked List II...
分类:
其他好文 时间:
2014-09-10 12:36:40
阅读次数:
220