<commit_before>---
layout: post
title: 2. Add Two Numbers
subtitle: Difficulty - Medium
tags:
permalink: /2016/11/01/2_Add_Two_Numbers/
comments:
---


# [2. Add Two Numbers](https://leetcode.com/problems/add-two-numbers/)
 
You are given two linked lists representing two non-negative numbers. 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 liked list.

 - Example
 
  Input : (2 -> 4 -> 3) + (5 -> 6 -> 4)
  
  output : 7 -> 0 -> 8 
  
```c
/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     struct ListNode *next;
 * };
 */
struct ListNode* addTwoNumbers(struct ListNode* l1, struct ListNode* l2) {
    
}
```<commit_msg>Update 2016-11-01-2_Add_Two_Numbers.md<commit_after>---
layout: post
title: 2. Add Two Numbers
subtitle: Difficulty - Medium
tags: [Leet-code, medium, algorithm, c, List]
permalink: /2016/11/01/2_Add_Two_Numbers/
comments: true
---


# [2. Add Two Numbers](https://leetcode.com/problems/add-two-numbers/)
 
You are given two linked lists representing two non-negative numbers. 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 liked list.

 - Example
 
  Input : (2 -> 4 -> 3) + (5 -> 6 -> 4)
  
  output : 7 -> 0 -> 8 
  
```c
/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     struct ListNode *next;
 * };
 */
struct ListNode* addTwoNumbers(struct ListNode* l1, struct ListNode* l2) {
    
}
```
{'fraction_non_alphanumeric': 0.12742561448900389, 'fraction_numerical': 0.03428201811125485, 'mean_word_length': 3.018181818181818, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '126452', 'n_tokens_mistral': 566, 'n_tokens_neox': 500, 'n_words': 183}