- 博客(60)
- 问答 (1)
- 收藏
- 关注
原创 JAVA中的符号引用
[1]符号引用(Symbolic References): 符号引用以一组符号来描述所引用的目标,符号可以是任何形式的字面量,只要使用时能够无歧义的定位到目标即可。例如,在Class文件中它以CONSTANT_Class_info、CONSTANT_Fieldref_info、CONSTANT_Methodref_info等类型的常量出现。符号引用与虚拟机的内存布局无关,引用的目标并不一
2017-07-28 11:02:49
2214
原创 LeetCode刷题【Array】 Find Minimum in Rotated Sorted Array
【题目】Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume
2017-07-21 16:07:28
401
原创 LeetCode刷题【Array】Minimum Size Subarray Sum
【题目】Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't one, return 0 instead.For example,
2017-07-20 13:02:54
371
原创 LeetCode刷题【Array】 Maximum Average Subarray I
【题目】Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to output the maximum average value.Example 1:
2017-07-19 09:45:20
416
原创 LeetCode刷题【Array】 Maximum Product of Three Numbers
【题目】Given an integer array, find three numbers whose product is maximum and output the maximum product.Example 1:Input: [1,2,3]Output: 6Example 2:Input: [1,2,3,4]Output: 2
2017-07-18 11:42:59
313
原创 LeetCode刷题【Array】 Shortest Unsorted Continuous Subarray
【题目】 Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order, too.You
2017-07-18 10:26:59
600
原创 LeetCode刷题【Array】 Can Place Flowers
【题目】Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots - they would compete for water and both would
2017-07-14 08:40:06
465
原创 Bad operand types for binary operator '&&'
Bad operand types for binary operator ‘&&’eg:if((number[i]/10)&&(number[i]>100)){}这里会抛出一个“Bad operand types for binary operator '&&'”的错误;这是由于number[i]/10 是一个number而不是一个boolean;&&是逻辑运算符,逻辑运算符只能针对boolean
2017-07-14 08:36:26
3738
原创 数理统计基础
数理统计数理统计词汇对照表中心趋势度量离散程度度量偏度峰度变异系数与夏普比率词汇对照表 术语 英文 解释 总体 population 样本 sample 离散性 dispersion 众数 mode 随机变量中观测值出现次数 中位数 median 极差 Range 最好与最坏的差中心趋势度量算术
2017-07-06 11:01:01
2524
原创 货币的时间价值
货币的时间价值 未来的100元不等于现在的100元货币的时间价值利率现金流1. 利率表现形式 要求回报率 要求回报率=名义无风险利率+风险溢价;名义无风险利率=实际无风险利率+预期通胀率;风险溢价=流动性风险溢价+违约风险溢价+期限风险溢价;折现率机会成本年利率 名义年利率 指以年为周期计算的利率;有效年利率(EAR) math EAR = (1+r/n)^n-
2017-07-05 15:58:56
2304
原创 【基础】银行间市场金融设施
一、银行间市场金融设施组成 银行间市场金融设施组成如下:包括外汇交易中心暨全国银行同业拆借中心、中债登、上清所,交易商协会; 外汇交易中心(CFETS) http://www.chinamoney.com.cn/index.html 中债登 http://www.chinabond.com.cn/ 上清所(SHCH) http://www.shc
2017-06-19 16:49:17
4210
原创 JAVA-数值计算中的特殊情况,NAN,Infinity
最近在项目中遇到了double数据出现Infinity的情况;于是对数值计算中几种比较特殊的情况进行了实践: public static void main(String[] args) { // 非0number/0.0 System.out.println((double)(5/0.0)); // 0/0.0 System.out.println((double)
2017-05-18 10:39:56
4675
原创 LeetCode刷题【Array】 Next Permutation
题目:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest p
2017-04-06 09:43:56
371
原创 LeetCode刷题【Array】 Combination Sum II
题目:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each number in C may only be used once in th
2017-03-30 14:50:09
324
原创 LeetCode刷题【Array】 Combination Sum
题目:iven a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be
2017-03-29 16:41:37
494
原创 LeetCode刷题【Array】 Sort Colors
题目:Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the
2017-03-29 14:16:58
327
原创 LeetCode刷题【Array】 Teemo Attacking
题目:In LLP world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascending time series towards Ashe and the pois
2017-03-29 11:18:01
305
原创 LeetCode刷题【Array】 Find All Duplicates in an Array
题目:Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements that appear twice in this array.Could you do it w
2017-03-29 11:00:47
401
原创 LeetCode刷题【Array】 Insert Delete GetRandom O(1)
题目:Design a data structure that supports all following operations in average O(1) time.insert(val): Inserts an item val to the set if not already present.remove(val): Removes an item val
2017-03-29 10:14:51
362
原创 JAVA源码阅读-HashMap(一)
HashMap 是Java集合框架下常用的一类,其以Key-Value的形式保持数据;HashMap是Map接口的实现,通过hash算法实现key-value的存储。一、HashMap的继承结构继承结构 实现接口HashMap 实现了: Map、Cloneable、Serializable 接口; 实现子类 关于HashMap的直
2017-03-28 17:19:48
744
原创 LeetCode刷题【Array】 Rotate Image
题目:You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?解决方法: (i,j) --> (n-j-1,i)public class Sol
2017-03-28 14:58:55
255
原创 LeetCode刷题【Array】 Jump Game
题目:Total Accepted: 113783Total Submissions: 388544Difficulty: MediumContributors: AdminGiven an array of non-negative integers, you are initially positioned at the first index of the a
2017-03-28 11:06:46
252
原创 LeetCode刷题【Array】 Merge Intervals
题目:Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].解决方法:Runtime: 97 ms/** * Definition fo
2017-03-28 09:21:25
307
原创 LeetCode刷题【Array】 Spiral Matrix II
题目:Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should return the following matrix:[ [ 1, 2, 3 ], [ 8, 9
2017-03-23 16:14:38
344
原创 LeetCode刷题【Array】 Spiral Matrix
题目:Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9
2017-03-23 15:57:37
295
原创 LeetCode刷题【Array】 Unique Paths II
题目:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively
2017-03-23 15:20:52
319
原创 LeetCode刷题【Array】 Unique Paths
题目:A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to r
2017-03-22 17:25:34
259
原创 LeetCode刷题【Array】 Minimum Path Sum
题目:Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or
2017-03-22 16:56:19
387
原创 LeetCode刷题【Array】 Set Matrix Zeroes
题目:Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?A straight forward solution
2017-03-22 16:03:35
470
原创 LeetCode刷题【Array】Search a 2D Matrix
题目:Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to right.The first intege
2017-03-22 14:44:53
293
原创 LeetCode刷题【Array】 Product of Array Except Self
题目:Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements ofnums except nums[i].Solve it without division
2017-03-21 11:26:17
271
原创 LeetCode刷题【Array】 Word Search
题目:Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or v
2017-03-21 10:38:38
260
原创 LeetCode刷题【Array】 Remove Duplicates from Sorted Array II
题目:Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array nums = [1,1,1,2,2,3],Your function should return length = 5, with the
2017-03-20 17:34:09
214
原创 LeetCode刷题【Array】 Search in Rotated Sorted Array II
题目:Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Suppose an array sorted in ascending order is
2017-03-20 15:47:45
324
原创 LeetCode刷题【Array】 Search in Rotated Sorted Array
题目:Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search
2017-03-20 14:53:38
276
原创 LeetCode刷题【Array】 Game of Life
题目:According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970."Given a boar
2017-03-20 10:40:57
369
原创 LeetCode刷题【Array】 Subsets II
题目:Given a collection of integers that might contain duplicates, nums, return all possible subsets.Note: The solution set must not contain duplicate subsets.For example,If nums = [1,2,
2017-03-18 17:55:47
298
原创 LeetCode刷题【Array】 Subsets
题目:Given a set of distinct integers, nums, return all possible subsets.Note: The solution set must not contain duplicate subsets.For example,If nums = [1,2,3], a solution is:[ [3
2017-03-18 17:33:31
434
原创 LeetCode刷题【Array】 Construct Binary Tree from Preorder and Inorder Traversal
题目:Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.解决方法:Runtime: 7 ms/** * Definition for a
2017-03-18 15:35:05
280
原创 LeetCode刷题【Array】 Construct Binary Tree from Inorder and Postorder Traversal
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.解决方法一:Runtime: 22 ms/** * Definition for a binary
2017-03-17 23:34:46
267
空空如也
C# 嵌套结构体 和byte 数组互相转换?
2014-08-19
TA创建的收藏夹 TA关注的收藏夹
TA关注的人