dengxinyi 6 vuotta sitten
vanhempi
commit
9b1826479e
2 muutettua tiedostoa jossa 26 lisäystä ja 0 poistoa
  1. 15 0
      easy/237.delete-node-in-a-linked-list.js
  2. 11 0
      easy/257.binary-tree-paths.go

+ 15 - 0
easy/237.delete-node-in-a-linked-list.js

@@ -0,0 +1,15 @@
+/**
+ * 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
+}

+ 11 - 0
easy/257.binary-tree-paths.go

@@ -0,0 +1,11 @@
+/**
+ * Definition for a binary tree node.
+ * type TreeNode struct {
+ *     Val int
+ *     Left *TreeNode
+ *     Right *TreeNode
+ * }
+ */
+func binaryTreePaths(root *TreeNode) []string {
+	
+}