3 Haskei



TA的排名 2w+


oracle的Security group rules,在inbound选项里面,没有设置如下的IP,意思是任何的外部IP地址都可以连接到该数据库

2020-02-20 00:17:22

Uniform Cost Search (UCS)

BFS用于找到每个边的权值是一样的图的最短路径,如果图中每个边的权值不一样了,就用到了UCS。参考了https://blog.csdn.net/jdh99/article/details/80872364算法思路:1.数据结构frontier: 优先队列,用来存储到达当前顶点花费的代价,这里的代价是目前最小的代价,后面如果有到达该点的更短路径,则更新这个代价。探索点的时候,每次都从...

2020-02-18 15:37:35

Longest Substring Without Repeating Characters

3.Longest Substring Without Repeating CharactersMedium7654450Add to ListShareGiven a string, find the length of thelongest substringwithout repeating characters.Example 1:Input: "abcabcb...

2020-02-08 14:58:28

287. Find the Duplicate Number

287.Find the Duplicate NumberGiven an arraynumscontainingn+ 1 integers where each integer is between 1 andn(inclusive), prove that at least one duplicate number must exist. Assume that there i...

2020-01-31 14:53:58


参考https://blog.csdn.net/lym940928/article/details/89674125//顺时针旋转90度/* * clockwise rotate * first reverse up to down, then swap the symmetry * 1 2 3 7 8 9 7 4 1 * 4 5 6 => 4 5 ...

2020-01-30 08:03:45

448. Find All Numbers Disappeared in an Array

448.Find All Numbers Disappeared in an ArrayGiven an array of integers where 1 ≤ a[i] ≤n(n= size of array), some elements appear twice and others appear once.Find all the elements of [1,n] in...

2020-01-29 08:33:35

283. Move Zeroes

283.Move ZeroesGiven an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.Example:Input: [0,1,0,3,12]Output: [1,3,12,...

2020-01-29 05:20:10

78. Subsets

78.SubsetsGiven a set ofdistinctintegers,nums, return all possible subsets (the power set).Note:The solution set must not contain duplicate subsets.Example:Input: nums = [1,2,3]Output:...

2020-01-27 12:08:04

LeeCode 数组做题随笔(主要记录做题过程中的一些感悟)


2020-01-27 09:15:14

238. Product of Array Except Self

238.Product of Array Except SelfGiven an arraynumsofnintegers wheren> 1, return an arrayoutputsuch thatoutput[i]is equal to the product of all the elements ofnumsexceptnums[i].Ex...

2020-01-27 09:05:16

53. Maximum Subarray

53.Maximum SubarrayGiven an integer arraynums, find the contiguous subarray(containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-1,2,1,-5,4...

2020-01-27 07:47:01

34. Find First and Last Position of Element in Sorted Array 变向使用二分法

34.Find First and Last Position of Element in Sorted ArrayGiven an array of integersnumssorted in ascending order, find the starting and ending position of a giventargetvalue.Your algorith...

2020-01-24 11:24:08

33. Search in Rotated Sorted Array 二分法的变向使用

33.Search in Rotated Sorted ArrayMediumSuppose 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 a...

2020-01-23 08:39:29

31. Next Permutation

31.Next PermutationImplementnext permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as...

2020-01-17 11:36:21

LeeCode 3Sum

Given an arraynumsofnintegers, are there elementsa,b,cinnumssuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:The solution set must not cont...

2020-01-16 11:58:54

1.Two Sum - LeeCode hashmap

Given an array of integers, returnindicesof the two numbers such that they add up to a specific target.You may assume that each input would haveexactlyone solution, and you may not use thesame...

2020-01-07 08:33:29

42. Trapping Rain Water

解:辅助图片:class Solution {public: int trap(vector<int>& height) { int value=0; int cnt = height.capacity(); int maxIndex = 0; int sum = 0; ...

2019-12-19 15:02:59

LeeCode 4. Median of Two Sorted Arrays

4.Median of Two Sorted ArraysThere are two sorted arraysnums1andnums2of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+...

2019-12-17 04:24:01

Array 常用函数(C++)

std::remove(begin, end, value)该函数移除一个从begin到end位置,值等于value的数据。这个函数只是通过指针的移动来完成删除操作,将不等于value的值放到链表的最前端,然后返回一个指向新的尾值的迭代器(比如,[1,2,3,4,2], 最后会指向index=3,0是第一个元素)。std::distance(begin, end);返回begin与end...

2019-12-16 09:17:00



2019-11-07 08:34:58


勋章 我的勋章
  • 持之以恒
  • 勤写标兵Lv2