上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 56 下一页

2021年6月12日

摘要: 题目描述 给定一个单链表 L:L0→L1→…→Ln-1→Ln ,将其重新排列后变为: L0→Ln→L1→Ln-1→L2→Ln-2→…你不能只是单纯的改变节点内部的值,而是需要实际的进行节点交换。 示例 1: 给定链表 1->2->3->4, 重新排列为 1->4->2->3. 示例 2: 给定链表 阅读全文
posted @ 2021-06-12 16:21 朴素贝叶斯 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 题目描述 请判断一个链表是否为回文链表。 示例 1: 输入: 1->2 输出: false 示例 2: 输入: 1->2->2->1 输出: true 进阶: 你能否用 O(n) 时间复杂度和 O(1) 空间复杂度解决此题? /** * Definition for singly-linked li 阅读全文
posted @ 2021-06-12 12:20 朴素贝叶斯 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 题目描述 删除链表中等于给定值 val 的所有节点。 示例: 输入: 1->2->6->3->4->5->6, val = 6 输出: 1->2->3->4->5 /** * Definition for singly-linked list. * struct ListNode { * int v 阅读全文
posted @ 2021-06-12 11:15 朴素贝叶斯 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 题目描述 请编写一个函数,使其可以删除某个链表中给定的(非末尾)节点,你将只被给定要求被删除的节点。 现有一个链表 -- head = [4,5,1,9],它可以表示为: 示例 1: 输入: head = [4,5,1,9], node = 5 输出: [4,1,9] 解释: 给定你链表中值为 5 阅读全文
posted @ 2021-06-12 10:25 朴素贝叶斯 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 题目描述 编写一个程序,找到两个单链表相交的起始节点。 如下面的两个链表: 在节点 c1 开始相交。 示例 1: 输入:intersectVal = 8, listA = [4,1,8,4,5], listB = [5,0,1,8,4,5], skipA = 2, skipB = 3 输出:Refe 阅读全文
posted @ 2021-06-12 09:51 朴素贝叶斯 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 阅读全文
posted @ 2021-06-12 09:02 朴素贝叶斯 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given a binary tree and a sum, find all root-to-leaf paths where each paths sum equals the given sum. For example: Given the below binary tree an 阅读全文
posted @ 2021-06-12 08:16 朴素贝叶斯 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given s 阅读全文
posted @ 2021-06-12 07:13 朴素贝叶斯 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 题目描述 翻转一棵二叉树。 示例: 输入: 4 / 2 7 / \ / 1 3 6 9 输出: 4 / 7 2 / \ / 9 6 3 1 备注: 这个问题是受到 Max Howell 的 原问题 启发的 : 谷歌:我们90%的工程师使用您编写的软件(Homebrew),但是您却无法在面试时在白板上 阅读全文
posted @ 2021-06-12 06:25 朴素贝叶斯 阅读(28) 评论(0) 推荐(0) 编辑

2021年6月8日

摘要: 概述 BERT的全称是Bidirectional Encoder Representation from Transformers,是论文BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding中 阅读全文
posted @ 2021-06-08 20:27 朴素贝叶斯 阅读(1175) 评论(0) 推荐(0) 编辑
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 56 下一页

导航