Pinned Repositories
Binary-search
Binary search
C---
C++类学习-实现菱形打印
Dynamic-programming
动态规划问题,涉及三角形寻找最小路径,m*n矩阵寻找最小路径的问题
interview1_DeleteNumber
M elements of the array to selectively delete n,and eventually make the largest number left, how to delete
interview2-findMaxNumber
The array is incremented and subtracted to select the maximum value
interview3-findMaxSubStr
Find the largest string of a string
interview4_findMaxRepeatNum
An array with a number of repeats greater than 50%. Find that number
interview5_8Queues
In the grid of 8 X 8, eight queens (pieces) are placed,The condition is that any two queens (pieces) cannot be placed on the same row, the same column or the same diagonal line. How many ways can they be placed?
interview6_0_1_Knapsack-problem
有一个背包,背包总的承载重量是 Wkg。现在我们有 n 个物品,每个物品的重量不等,并且不可分割。我们现在期望选择几件物品,装载到背包中。在不超过背包所能装载重量的前提下,如何让背包中物品的总重量最大?
interview7_Calculator
简易计算器实现程序
Brick409's Repositories
Brick409/Binary-search
Binary search
Brick409/C---
C++类学习-实现菱形打印
Brick409/Dynamic-programming
动态规划问题,涉及三角形寻找最小路径,m*n矩阵寻找最小路径的问题
Brick409/interview1_DeleteNumber
M elements of the array to selectively delete n,and eventually make the largest number left, how to delete
Brick409/interview6_0_1_Knapsack-problem
有一个背包,背包总的承载重量是 Wkg。现在我们有 n 个物品,每个物品的重量不等,并且不可分割。我们现在期望选择几件物品,装载到背包中。在不超过背包所能装载重量的前提下,如何让背包中物品的总重量最大?
Brick409/interview7_Calculator
简易计算器实现程序
Brick409/LeetCode125_Valid_Palindrome
判断一个字符串是否是回文,只考虑字母数字字符而忽略大小写。
Brick409/LeetCode167_Two-Sum-II
给定一个目标target,再数组中找到两个数,使其和为target,并返回对应数组中索引(从1开始)
Brick409/LeetCode202_HappyNumber
判断一个数是否为happy nuumber,所谓happy number是指一个数,将其替换为其各位数字的平方和,重复这个过程,如果最终能得到1,这就是happy number;如果陷入一个不包含1的循环中,就不是happy number;
Brick409/LeetCode206_ReverseLinkList
实现链表反转
Brick409/LeetCode209_Minimum_Size_Subarray_Sum
给定一个整型数组和一个数字s,找到数组中最短的一个连续子数组, 使得连续子数组的数字和sum>=s,返回这个最短的连续子数组的长度值, 如:给定数组[2,3,1,2,4,3],s=7 答案为[4,3],返回2
Brick409/LeetCode215_Kth_Largest_Element
find the Kth Largest Element in an Array
Brick409/LeetCode242_Valid_Anagram
判断字符串t是否是字符串s变换自负顺序后得到的结果,如:s=“anagram”;t=“nagaram”,则返回true
Brick409/Leetcode283_MoveZeros
将给定数组中为0的元素移动到数组末尾,并保持其他非零元素位置不变
Brick409/LeetCode290_WordPattern
Brick409/LeetCode344_Reverse_String
在空间复杂度为O(1)的前提下,实现字符串反转
Brick409/LeetCode345_Reverse-Vowels-of-a-String
给定一个字符串,将字符串中的元音字母反转
Brick409/LeetCode349_-Intersection_of_Two_Arrays
比较两个数组,找出两个数组中的公共元素;Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] Output: [9,4]
Brick409/LeetCode3_Longest_Substring
在一个字符串中寻找没有重复字母的最长子串,区分大小写
Brick409/LeetCode438_Find_All_Anagrams_in_String
438题目:给定一个字符串s和一个非空字符串p,字符串全部由小写字母子组成。 在S中找出所有p对应的anagrams(颠倒)字符串的子串,返回这些子串的起始索引 如s="cbaebabacd" p="abc", 返回结果[0,6] 如s="abab" p="ba",返回[0,1,2]
Brick409/Leetcode75_SortedColor
给定一个有n个元素的数组,数组中元素的取值只有0,1,2三种可能,为这个数组排序
Brick409/LeetCode88_Merge-Sorted-Array
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. example:Input: nums1 = [1,2,3,0,0,0], m = 3 nums2 = [2,5,6], n = 3 Output: [1,2,2,3,5,6]
Brick409/LeftMaxNums
一个n位的数,去掉其中的k位,问怎样去掉使得留下来的那个(n-k)位的数最大?
Brick409/Sort_Test
Common sorting algorithm
Brick409/Fibonacci-sequence
Fibonacci sequence F(N) = F(N-1)+F(N-2) F[1]=1 F[0=1]
Brick409/LeetCode101_-Symmetric_Tree
求一个二叉树的镜像二叉树
Brick409/LeetCode209_Isomorphic_Strings
映射字符串
Brick409/LeetCode451_Sort_CharacersByFrequency
给定一个字符串,按照字母出现频率的倒序重组整个字符串
Brick409/Loop_Delete_Numbers_Intervals
有一个数组a[N]顺序存放0~N-1,要求每隔两个数删掉一个数,到末尾时循环至开头继续进行,求最后一个被删掉的数的原始下标位置。以8个数(N=7)为例:{0,1,2,3,4,5,6,7},0->1->2(删除)->3->4->5(删除)->6->7->0(删除),如此循环直到最后一个数被删除。
Brick409/NumberOfOne
Calculate the number of ones in a number