Skip to content

update code for Longest Substring Without Repeating Characters (LeetC… #351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions dsa-solutions/lc-solutions/0000-0099/0002-Add-Two-Numbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ tags:
- Linked List
- Math
- Recursion
- Add Two Numbers
- LeetCode
description: "This is a solution to the Add Two Numbers problem on LeetCode."
---

Expand Down Expand Up @@ -72,12 +74,19 @@ We iterate through both linked lists, adding corresponding node's values along w

```mermaid
flowchart TD
A[Start] --> B{l1 or l2 or carry}
B --> |Yes| C[Add values of l1, l2, and carry]
C --> D[Calculate new carry and current node value]
D --> E[Add node with value to result list]
E --> F{Move to next node in l1 and l2 if exist}
F --> |Next nodes exist| G{l1 or l2 or carry}
A[Start] --> B{l1 or l2
or carry}
B --> |Yes| C[Add values of l1, l2,
and carry]
C --> D[Calculate new carry and
current node value]
D --> E[Add node with value
to result list]
E --> F{Move to next
node in l1 and
l2 if exist}
F --> |Next nodes exist| G{l1 or l2
or carry}
G --> |Yes| C
G --> |No| H[Return result list]
F --> |Next nodes do not exist| H
Expand Down
Loading
Loading