|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 6 | + <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no"> |
| 7 | + <meta name="description" content="API docs for the AddTwoNumbers class from the add_two_numbers library, for the Dart programming language."> |
| 8 | + <title>AddTwoNumbers class - add_two_numbers library - Dart API</title> |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + <link rel="preconnect" href="https://fonts.gstatic.com"> |
| 13 | + <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet"> |
| 14 | + <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet"> |
| 15 | + |
| 16 | + <link rel="stylesheet" href="../static-assets/github.css?v1"> |
| 17 | + <link rel="stylesheet" href="../static-assets/styles.css?v1"> |
| 18 | + <link rel="icon" href="../static-assets/favicon.png?v1"> |
| 19 | + |
| 20 | +</head> |
| 21 | + |
| 22 | +<body data-base-href="../" data-using-base-href="false" class="light-theme"> |
| 23 | +<div id="overlay-under-drawer"></div> |
| 24 | +<header id="title"> |
| 25 | + <span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span> |
| 26 | + <ol class="breadcrumbs gt-separated dark hidden-xs"> |
| 27 | + <li><a href="../index.html">leetcode</a></li> |
| 28 | + <li><a href="../exercises_add_two_numbers/exercises_add_two_numbers-library.html">exercises/add_two_numbers.dart</a></li> |
| 29 | + <li class="self-crumb">AddTwoNumbers class</li> |
| 30 | + </ol> |
| 31 | + <div class="self-name">AddTwoNumbers</div> |
| 32 | + <form class="search navbar-right" role="search"> |
| 33 | + <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search..."> |
| 34 | + </form> |
| 35 | + <div class="toggle" id="theme-button" title="Toggle brightness"> |
| 36 | + <label for="theme"> |
| 37 | + <input type="checkbox" id="theme" value="light-theme"> |
| 38 | + <span id="dark-theme-button" class="material-symbols-outlined"> |
| 39 | + dark_mode |
| 40 | + </span> |
| 41 | + <span id="light-theme-button" class="material-symbols-outlined"> |
| 42 | + light_mode |
| 43 | + </span> |
| 44 | + </label> |
| 45 | + </div> |
| 46 | +</header> |
| 47 | +<main> |
| 48 | +<div |
| 49 | + id="dartdoc-main-content" |
| 50 | + class="main-content" |
| 51 | + data-above-sidebar="exercises_add_two_numbers/exercises_add_two_numbers-library-sidebar.html" |
| 52 | + data-below-sidebar="exercises_add_two_numbers/AddTwoNumbers-class-sidebar.html"> |
| 53 | + <div> |
| 54 | +<h1><span class="kind-class">AddTwoNumbers</span> class |
| 55 | + |
| 56 | +</h1></div> |
| 57 | + |
| 58 | + |
| 59 | +<section class="desc markdown"> |
| 60 | + <p><a href="https://leetcode.com/problems/add-two-numbers/description/">https://leetcode.com/problems/add-two-numbers/description/</a> |
| 61 | +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 contains a single digit. Add the two numbers and return the sum as a linked list. |
| 62 | +You may assume the two numbers do not contain any leading zero, except the number 0 itself. |
| 63 | +Example 1 |
| 64 | +<code>assets/add_two_numbers/addtwonumber1.jpg</code> |
| 65 | +Input: l1 = [2,4,3], l2 = [5,6,4] |
| 66 | +Output: [7,0,8] |
| 67 | +Explanation: 342 + 465 = 807. |
| 68 | +Example 2:</p> |
| 69 | +<p>Input: l1 = [0], l2 = [0] |
| 70 | +Output: [0] |
| 71 | +Example 3:</p> |
| 72 | +<p>Input: l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9] |
| 73 | +Output: [8,9,9,9,0,0,0,1]</p> |
| 74 | +</section> |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + <section class="summary offset-anchor" id="constructors"> |
| 80 | + <h2>Constructors</h2> |
| 81 | + <dl class="constructor-summary-list"> |
| 82 | + <dt id="AddTwoNumbers" class="callable"> |
| 83 | + <span class="name"><a href="../exercises_add_two_numbers/AddTwoNumbers/AddTwoNumbers.html">AddTwoNumbers</a></span><span class="signature">()</span> |
| 84 | + </dt> |
| 85 | + <dd> |
| 86 | + |
| 87 | + </dd> |
| 88 | + </dl> |
| 89 | + </section> |
| 90 | + |
| 91 | + <section |
| 92 | + class="summary offset-anchor inherited" |
| 93 | + id="instance-properties"> |
| 94 | + <h2>Properties</h2> |
| 95 | + <dl class="properties"> |
| 96 | + <dt id="hashCode" class="property inherited"> |
| 97 | + <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></span> |
| 98 | + <span class="signature">→ <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span> |
| 99 | + |
| 100 | + |
| 101 | +</dt> |
| 102 | +<dd class="inherited"> |
| 103 | + The hash code for this object. |
| 104 | + <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div> |
| 105 | + |
| 106 | +</dd> |
| 107 | + |
| 108 | + <dt id="runtimeType" class="property inherited"> |
| 109 | + <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></span> |
| 110 | + <span class="signature">→ <a href="https://api.flutter.dev/flutter/dart-core/Type-class.html">Type</a></span> |
| 111 | + |
| 112 | + |
| 113 | +</dt> |
| 114 | +<dd class="inherited"> |
| 115 | + A representation of the runtime type of the object. |
| 116 | + <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div> |
| 117 | + |
| 118 | +</dd> |
| 119 | + |
| 120 | + </dl> |
| 121 | + </section> |
| 122 | + |
| 123 | + |
| 124 | + <section |
| 125 | + class="summary offset-anchor" |
| 126 | + id="instance-methods"> |
| 127 | + <h2>Methods</h2> |
| 128 | + <dl class="callables"> |
| 129 | + <dt id="addTwoNumbers" class="callable"> |
| 130 | + <span class="name"><a href="../exercises_add_two_numbers/AddTwoNumbers/addTwoNumbers.html">addTwoNumbers</a></span><span class="signature">(<wbr><span class="parameter" id="addTwoNumbers-param-l1"><span class="type-annotation"><a href="../models_list_node/ListNode-class.html">ListNode</a>?</span> <span class="parameter-name">l1</span>, </span><span class="parameter" id="addTwoNumbers-param-l2"><span class="type-annotation"><a href="../models_list_node/ListNode-class.html">ListNode</a>?</span> <span class="parameter-name">l2</span></span>) |
| 131 | + <span class="returntype parameter">→ <a href="../models_list_node/ListNode-class.html">ListNode</a>?</span> |
| 132 | + </span> |
| 133 | + |
| 134 | + |
| 135 | +</dt> |
| 136 | +<dd> |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | +</dd> |
| 141 | + |
| 142 | + <dt id="noSuchMethod" class="callable inherited"> |
| 143 | + <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></span><span class="signature">(<wbr><span class="parameter" id="noSuchMethod-param-invocation"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Invocation-class.html">Invocation</a></span> <span class="parameter-name">invocation</span></span>) |
| 144 | + <span class="returntype parameter">→ dynamic</span> |
| 145 | + </span> |
| 146 | + |
| 147 | + |
| 148 | +</dt> |
| 149 | +<dd class="inherited"> |
| 150 | + Invoked when a nonexistent method or property is accessed. |
| 151 | + <div class="features"><span class="feature">inherited</span></div> |
| 152 | + |
| 153 | +</dd> |
| 154 | + |
| 155 | + <dt id="toString" class="callable inherited"> |
| 156 | + <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/toString.html">toString</a></span><span class="signature">(<wbr>) |
| 157 | + <span class="returntype parameter">→ <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> |
| 158 | + </span> |
| 159 | + |
| 160 | + |
| 161 | +</dt> |
| 162 | +<dd class="inherited"> |
| 163 | + A string representation of this object. |
| 164 | + <div class="features"><span class="feature">inherited</span></div> |
| 165 | + |
| 166 | +</dd> |
| 167 | + |
| 168 | + </dl> |
| 169 | + </section> |
| 170 | + |
| 171 | + <section |
| 172 | + class="summary offset-anchor inherited" |
| 173 | + id="operators"> |
| 174 | + <h2>Operators</h2> |
| 175 | + <dl class="callables"> |
| 176 | + <dt id="operator ==" class="callable inherited"> |
| 177 | + <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></span><span class="signature">(<wbr><span class="parameter" id="==-param-other"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Object-class.html">Object</a></span> <span class="parameter-name">other</span></span>) |
| 178 | + <span class="returntype parameter">→ <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> |
| 179 | + </span> |
| 180 | + |
| 181 | + |
| 182 | +</dt> |
| 183 | +<dd class="inherited"> |
| 184 | + The equality operator. |
| 185 | + <div class="features"><span class="feature">inherited</span></div> |
| 186 | + |
| 187 | +</dd> |
| 188 | + |
| 189 | + </dl> |
| 190 | + </section> |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + </div> <!-- /.main-content --> |
| 196 | + <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left"> |
| 197 | + <!-- The search input and breadcrumbs below are only responsively visible at low resolutions. --> |
| 198 | +<header id="header-search-sidebar" class="hidden-l"> |
| 199 | + <form class="search-sidebar" role="search"> |
| 200 | + <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search..."> |
| 201 | + </form> |
| 202 | +</header> |
| 203 | +<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav"> |
| 204 | + <li><a href="../index.html">leetcode</a></li> |
| 205 | + <li><a href="../exercises_add_two_numbers/exercises_add_two_numbers-library.html">add_two_numbers</a></li> |
| 206 | + <li class="self-crumb">AddTwoNumbers class</li> |
| 207 | +</ol> |
| 208 | + |
| 209 | + <h5>add_two_numbers library</h5> |
| 210 | + <div id="dartdoc-sidebar-left-content"></div> |
| 211 | + </div> |
| 212 | + <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right"> |
| 213 | + </div><!--/.sidebar-offcanvas--> |
| 214 | +</main> |
| 215 | +<footer> |
| 216 | + <span class="no-break"> |
| 217 | + leetcode |
| 218 | + 1.0.0 |
| 219 | + </span> |
| 220 | + |
| 221 | +</footer> |
| 222 | + |
| 223 | + |
| 224 | +<script src="../static-assets/highlight.pack.js?v1"></script> |
| 225 | +<script src="../static-assets/docs.dart.js"></script> |
| 226 | + |
| 227 | +</body> |
| 228 | +</html> |
| 229 | + |
0 commit comments