随笔分类 - 数据结构与算法----双指针
摘要:Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function
        阅读全文
                
摘要:Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length 
        阅读全文
                
摘要:Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar
        阅读全文
                
摘要:Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space for another array, yo
        阅读全文
                
摘要:Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, we use 
        阅读全文
                
摘要:Given a linked list, remove the n-th node from the end of list and return its head. Example: Note: Given n will always be valid. Follow up: Could you 
        阅读全文
                
摘要:Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to in
        阅读全文
                
摘要:Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we use an integer pos which represents the posi
        阅读全文
                

浙公网安备 33010602011771号