Loading

09 2021 档案

摘要:Convert Binary Number in a Linked List to Integer Given head which is a reference node to a singly-linked list. The value of each node in the linked l 阅读全文
posted @ 2021-09-23 14:36 Pen9 阅读(42) 评论(0) 推荐(0)
摘要:面试题 02.02. Kth Node From End of List LCCI Implement an algorithm to find the kth to last element of a singly linked list. Return the value of the elem 阅读全文
posted @ 2021-09-22 11:25 Pen9 阅读(43) 评论(0) 推荐(0)
摘要:剑指 Offer 24. 反转链表 定义一个函数,输入一个链表的头节点,反转该链表并输出反转后链表的头节点。 示例: 输入: 1->2->3->4->5->NULL 输出: 5->4->3->2->1->NULL 限制: 0 ⇐ 节点个数 ⇐ 5000 /** * Definition for si 阅读全文
posted @ 2021-09-22 11:21 Pen9 阅读(39) 评论(0) 推荐(0)
摘要:剑指 Offer 06. 从尾到头打印链表 输入一个链表的头节点,从尾到头反过来返回每个节点的值(用数组返回)。 示例 1: 输入:head = [1,3,2] 输出:[2,3,1] 限制: 0 ⇐ 链表长度 ⇐ 10000 /** * Definition for singly-linked li 阅读全文
posted @ 2021-09-22 11:15 Pen9 阅读(34) 评论(0) 推荐(0)
摘要:704. Binary Search Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in num 阅读全文
posted @ 2021-09-19 15:27 Pen9 阅读(46) 评论(0) 推荐(0)
摘要:Title Description 20. Valid Parentheses Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string 阅读全文
posted @ 2021-09-19 15:20 Pen9 阅读(41) 评论(0) 推荐(0)