码迷,mamicode.com
首页 >  
搜索关键字:divide two integers    ( 17573个结果
450. Delete Node in a BST
Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of th ...
分类:其他好文   时间:2020-06-04 11:56:26    阅读次数:48
【leetcode】1433. Check If a String Can Break Another String
题目如下: Given two strings: s1 and s2 with the same size, check if some permutation of string s1 can break some permutation of string s2 or vice-versa (i ...
分类:其他好文   时间:2020-06-03 23:41:15    阅读次数:108
1029. Two City Scheduling
There are 2N people a company is planning to interview. The cost of flying the i-th person to city A is costs[i][0], and the cost of flying the i-th p ...
分类:其他好文   时间:2020-06-03 23:34:27    阅读次数:72
【leetcode】1432. Max Difference You Can Get From Changing an Integer
题目如下: You are given an integer num. You will apply the following steps exactly two times: Pick a digit x (0 <= x <= 9). Pick another digit y (0 <= y < ...
分类:其他好文   时间:2020-06-03 23:33:43    阅读次数:70
用Verilog来实现d触发器2分频的Verilog hdl程序
module divide_2(clk,rst,clk_out); input clk,rst;output clk_out; reg clk_out; always @(posedge clk or negedge rst) if(!rst) begin clk_out<=0; end else ...
分类:其他好文   时间:2020-06-03 15:31:59    阅读次数:79
PAT.1065 A+B and C(64bit) (正负数溢出处理)
1065 A+B and C (64bit) (20分) Given three integers A, B and C in [?], you are supposed to tell whether A+B>C. Input Specification: The first line of th ...
分类:其他好文   时间:2020-06-03 13:53:54    阅读次数:74
Maximum Subsequence Sum(java)
7-1 Maximum Subsequence Sum(25 分) Given a sequence of K integers { N?1??, N?2??, ..., N?K?? }. A continuous subsequence is defined to be { N?i??, N?i+ ...
分类:编程语言   时间:2020-06-03 13:26:04    阅读次数:52
【leetcode】1422. Maximum Score After Splitting a String
题目如下: Given a string s of zeros and ones, return the maximum score after splitting the string into two non-empty substrings (i.e. left substring and r ...
分类:其他好文   时间:2020-06-01 18:02:06    阅读次数:65
1. 两数之和
题目描述 leetcode - 1:https://leetcode-cn.com/problems/two-sum/ 解题关键 hashmap的使用 碎碎念 题目比较简单,暴力过很容易,不过借助hash可以降低时间复杂度,但是增加了空间的消耗。学习了hashmap的使用 key:value 定义 ...
分类:其他好文   时间:2020-06-01 01:06:46    阅读次数:77
LeetCode 29. 两数相除 Divide Two Integers
使用了long。没有解决int的溢出问题。 class Solution { public: int divide(int dividend, int divisor) { //if (dividend == 0) return 0; //if (divisor == 1) return divid ...
分类:其他好文   时间:2020-05-31 18:17:56    阅读次数:101
17573条   上一页 1 ... 30 31 32 33 34 ... 1758 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!