文件名称:leetcode添加元素使和等于-LeetcodePractice:力码练习
文件大小:353KB
文件格式:ZIP
更新时间:2024-07-20 00:36:23
系统开源
leetcode添加元素使和等于 LeetcodePractice 用C++刷Leetcode题 2. Add Two Numbers You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Output: 7 -> 0 -> 8 思路: 题目中明确了一点,存储在链表中的数是倒序的,比如例子中的2 -> 4 -> 3表示的数就应该是342,这无疑是降低了难
【文件预览】:
LeetcodePractice-master
----LearningCPP.xcodeproj()
--------project.xcworkspace()
--------project.pbxproj(8KB)
--------xcuserdata()
----C++学习笔记.md(22KB)
----MachineLearning()
--------rabiner1989论文笔记.md(10KB)
--------image()
--------机器学习笔记.md(4KB)
----LearningCPP()
--------main.cpp(121KB)
----README.md(49KB)
----面经.md(51KB)