- Notifications
You must be signed in to change notification settings - Fork14
[Non-formatted] [Non-tested] 2. Add Two Numbers#123
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -0,0 +1,10 @@ | |||
import { test } from "https://deno.land/std/testing/mod.ts"; | |||
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; | |||
import { createSinglyLinkedListNode } from '../test_utilities/linked_list.ts'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Codacy has a fix for the issue:Strings must use doublequote.
import{createSinglyLinkedListNode}from'../test_utilities/linked_list.ts'; | |
import{createSinglyLinkedListNode}from"../test_utilities/linked_list.ts"; |
@@ -0,0 +1,17 @@ | |||
import { SinglyLinkedListNode } from '../types/linked_list.ts'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Codacy has a fix for the issue:Strings must use doublequote.
import{SinglyLinkedListNode}from'../types/linked_list.ts'; | |
import{SinglyLinkedListNode}from"../types/linked_list.ts"; |
// 2. Add Two Numbers | ||
// https://leetcode.com/problems/add-two-numbers/ | ||
export default function addTwoNumbers(nodeA: SinglyLinkedListNode<number>, nodeB: SinglyLinkedListNode<number>) { | ||
if (!nodeA || !nodeB) return nodeA ?? nodeB ?? null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Codacy has a fix for the issue:Expected { after 'if' condition.
if(!nodeA||!nodeB)returnnodeA??nodeB??null; | |
if(!nodeA||!nodeB){returnnodeA??nodeB??null;} |
No description provided.