摘要:
package org.skyeye.test; import org.springframework.util.Assert; public class NodeAdd { public static class Node{ int data; Node next; public static enum N... 阅读全文
摘要:
比如 1->2->4->6->7 + 3->4->5 => 1->2->8->1>2 思想是先把两个链表反转, 从低位相加, 得到结果, 再反转回来#! /usr/bin/env python# -*- coding: utf-8 -*- 阅读全文
摘要:
class Node(object): def __init__(self, data, next): self.data = data self.next = next def reverse(head): if head is None or head.next is None: return head pre ... 阅读全文