File metadata and controls Code Blame 32 lines (28 loc) · 768 Bytes Raw impl Solution { pub fn remove_kdigits(num: String, k: i32) -> String { let mut stack = vec![]; let mut k = k as usize; for ch in num.chars() { while let Some(&top) = stack.last() { if k >...
Collection of LeetCode questions to ace the coding interview! - Created using [LeetHub](https://github.com/QasimWani/LeetHub) - leetcode_problems/1909-remove-one-element-to-make-the-array-strictly-increasing at main · RakshaFauzdar/leetcode_problems
publicvoidTestAdjacent(){ IMatrix<string> matrix =newMatrix<string>(3,3); List<string> items =newList<string>(9);for(inti =0; i < items.Capacity; i++) { items.Add(string.Format("{0}", i)); }varindex =0;for(inty =0; y < matrix.Rows; y++) {intx;for(x =0; x < matr...
Remove all elements from a linked list of integers that have valueval. Example: Input:1->2->6->3->4->5->6,val= 6Output:1->2->3->4->5 如果第一个数字,就需要删除,那么需要重置head。所以自己构建1个myHead。 publicListNode RemoveElements(ListNode head,intval) { ListNode myHead=newListN...