码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
【List习题】Reversing Linked List
Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, ...
分类:其他好文   时间:2020-03-13 13:03:41    阅读次数:52
[LeetCode] 450. Delete Node in a BST
删除二叉搜索树中的节点。题意是给一个二叉搜索树和一个节点key,请将key从BST中删除并维持BST的性质。例子, Example: root = [5,3,6,2,4,null,7] key = 3 5 / \ 3 6 / \ \ 2 4 7 Given key to delete is 3. S ...
分类:其他好文   时间:2020-03-12 10:15:46    阅读次数:59
1372. Longest ZigZag Path in a Binary Tree
Given a binary tree root, a ZigZag path for a binary tree is defined as follow: Choose any node in the binary tree and a direction (right or left). If ...
分类:其他好文   时间:2020-03-12 09:26:04    阅读次数:76
1105 Spiral Matrix (25分)
1105 Spiral Matrix (25分) This time your job is to fill a sequence of N positive integers into a spiral matrix in non increasing order. A spiral matrix ...
分类:其他好文   时间:2020-03-11 23:40:07    阅读次数:75
02-线性结构3 Reversing Linked List (25分)(链表每段反转)
02-线性结构3 Reversing Linked List (25分) Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. Fo ...
分类:其他好文   时间:2020-03-11 23:38:11    阅读次数:110
【学校个人赛】two operations 想法题 基础数学
先上题目: C. Two operations time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given an ...
分类:其他好文   时间:2020-03-11 19:28:17    阅读次数:66
404. Sum of Left Leaves
Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two left leaves in the binary tree, with values 9 and 1 ...
分类:其他好文   时间:2020-03-10 19:55:11    阅读次数:54
CodeForces - 1131D(Three Integers)
题目链接:https://codeforces.com/contest/1311/problem/D 题意: 给出三个整数 a ≤ b ≤ c ,您可以添加+1 或 1 到这三个整数中的任何一个增加或减少 1 ,可以执行任意次(可能为零)次这样的操作,甚至可以一次执行多次。求执行此类操作的最少次数, ...
分类:其他好文   时间:2020-03-09 16:21:38    阅读次数:43
E. Construct the Binary Tree。。。
You are given two integers nn and dd . You need to construct a rooted binary tree consisting of nn vertices with a root at the vertex 11 and the sum o ...
分类:其他好文   时间:2020-03-09 10:32:58    阅读次数:52
Our Tanya is Crying Out Loud
Right now she actually isn't. But she will be, if you don't solve this problem. You are given integers n, k, A and B. There is a number x, which is in ...
分类:其他好文   时间:2020-03-08 16:02:10    阅读次数:75
24278条   上一页 1 ... 59 60 61 62 63 ... 2428 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!