본문 바로가기
Coding Test/LeetCode

[LeetCode] (Linked List) Lv Easy. Delete Node in a Linked List

by song.ift 2023. 1. 16.

https://leetcode.com/explore/interview/card/top-interview-questions-easy/93/linked-list/553/

 

Explore - LeetCode

LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore.

leetcode.com

 

javascript
닫기
/** * Definition for singly-linked list. * function ListNode(val) { * this.val = val; * this.next = null; * } */ /** * @param {ListNode} node ​* @return {void} Do not return anything, modify node in-place instead. ​*/ var deleteNode = function(node) { ​​​​node.val = node.next.val; ​​​​node.next = node.next.next; };

GitHub : https://github.com/developeSHG/Algorithm-LeetCode/tree/main/delete-node-in-a-linked-list

 

GitHub - developeSHG/Algorithm-LeetCode: 릿코드 소스코드

릿코드 소스코드. Contribute to developeSHG/Algorithm-LeetCode development by creating an account on GitHub.

github.com

 

댓글