分類: leedcode中級(C#)

leedcode_Medium(C#)解題紀錄

2 篇文章

2. Add Two Numbers
僅記錄 /** * Definition for singly-linked list. * public class ListNode { * public int val; * public ListNode next; * public ListNode(int val=0, ListNode next=null) { * this.val ...
1910. Remove All Occurrences of a Substrin
解題 題目:https://leetcode.com/problems/remove-all-occurrences-of-a-substring/ 目標:删除s字串内所有出现的part 使用IndexOf(string)回報字串第一次出現時的所在索引 (以零為起始) 再來用while迴圈做移除字元Remove(索引, part字串長度)並重新回報...