码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
二分查找(Binary Search)Java实现
使用二分查找的序列必须是有序的。 时间复杂度O(logn),每次当前序列长度的一半。 1. 递归实现 /** * To search if the target is in a given array. If find, return the position of * the target in ...
分类:编程语言   时间:2020-03-23 09:42:51    阅读次数:79
#3 Longest Substring Without Repeating Characters
3 Longest Substring Without Repeating Characters 问题描述 Given a string, find the length of the longest substring without repeating characters. Example 1 ...
分类:其他好文   时间:2020-03-22 19:48:22    阅读次数:54
Three Integers
"Three Integers" 枚举$a,b$ 处理 $c$ 最小上界 $cc = cb (c / cb) + 1 cb;$ 最大上界$cc = cb (c / cb) + 0 cb;$ ...
分类:其他好文   时间:2020-03-22 12:21:22    阅读次数:76
LeetCode | 1385. Find the Distance Value Between Two Arrays两个数组间的距离值【Python】
LeetCode 1385. Find the Distance Value Between Two Arrays两个数组间的距离值【Easy】【Python】【暴力】 Problem "LeetCode" Given two integer arrays and , and the integer ...
分类:编程语言   时间:2020-03-22 10:27:21    阅读次数:80
LeetCode | 1387. Sort Integers by The Power Value将整数按权重排序【Python】
LeetCode 1387. Sort Integers by The Power Value将整数按权重排序【Medium】【Python】【排序】 Problem "LeetCode" The power of an integer is defined as the number of ste ...
分类:编程语言   时间:2020-03-22 10:23:56    阅读次数:87
2.(101)对称二叉树
2.(101)对称二叉树 2020年3月20日 Symmetric Tree Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, thi ...
分类:其他好文   时间:2020-03-21 21:50:27    阅读次数:86
LeetCode 796. Rotate String
原题链接在这里:https://leetcode.com/problems/rotate-string/ 题目: We are given two strings, A and B. A shift on A consists of taking string A and moving the le ...
分类:其他好文   时间:2020-03-21 14:31:02    阅读次数:42
PTA(Advanced Level)1059.Prime Factors
Given any positive integer N , you are supposed to find all of its prime factors, and write them in the format N = p 1 k 1× p 2 k 2×?× p m k m . Input ...
分类:其他好文   时间:2020-03-21 13:10:32    阅读次数:77
LeetCode 470. Implement Rand10() Using Rand7()
原题链接在这里:https://leetcode.com/problems/implement-rand10-using-rand7/ 题目: Given a function rand7 which generates a uniform random integer in the range 1 ...
分类:其他好文   时间:2020-03-21 09:59:59    阅读次数:57
LeetCode | 0102. Binary Tree Level Order Traversal二叉树的层次遍历【Python】
LeetCode 0102. Binary Tree Level Order Traversal二叉树的层次遍历【Medium】【Python】【BFS】 Problem "LeetCode" Given a binary tree, return the level order traversal ...
分类:编程语言   时间:2020-03-20 23:49:28    阅读次数:74
24278条   上一页 1 ... 56 57 58 59 60 ... 2428 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!