摘要:
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Given linked list -- head = [4,5,1,9], wh 阅读全文
摘要:
Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your 阅读全文
摘要:
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example,Given 1->2 阅读全文
摘要:
Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Example 2: 移除有序链表中的重复项,返回新链表。定义1个指针指向链表的第一个元素,然后 阅读全文
摘要:
Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length. Do not allocate extra 阅读全文
摘要:
Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra spa 阅读全文
摘要:
Given an integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order. For example,Given n = 3, You should return the follow 阅读全文
摘要:
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix: You s 阅读全文
摘要:
You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in-place, which 阅读全文