- 博客(287)
- 资源 (1)
- 收藏
- 关注
原创 剑指offer--Java实现
剑指offer合辑之面试01-67《剑指offer》面试题 Java 代码的 Github 地址《剑指offer》面试题 Markdown 版本,包含题目、分析及代码的 Github 地址面试题2 实现单例模式面试题3 二维数组中的查找面试题4 替换空格面试题5 从尾到头打印链表面试题6 重建二叉树面试题7 用两个栈实现队列面试题8 旋转数组的最小数字面试题9 斐波那契数列...
2019-02-25 22:56:03 3809
原创 LeetCode高频题目(100)汇总-Java实现
LeetCode高频题目(100)汇总-Java实现目录第01-50题【Leetcode-easy-1】 Two Sum【Leetcode-easy-2】 Add Two Numbers【Leetcode-easy-3】 Longest Substring Without Repeating Characters【Leetcode-easy-5】 Longest Palindromic Substr
2017-08-23 19:03:06 11767
原创 【Java进阶】实现自己的ORM框架
【Java进阶】实现自己的ORM框架本文将介绍简单的ORM框架的实现过程。为了能够顺利的读懂本文,你需要有JDBC、注解和反射的基础知识。 先看看效果,一条语句实现插入和更新操作。// 创建SimpleDbPipe对象SimpleDbPipe<Student> dbPipe = new SimpleDbPipe<Student>();// 创建一个带插入数...
2017-08-20 18:58:41 10766 1
原创 【排序算法】排序算法总结
排序算法】排序算法总结排序算法分类插入排序: 直接插入、希尔排序 选择排序: 简单选择、堆排序 交换排序: 冒泡排序、快速排序 归并排序: 归并排序桶排序、基数排序、计数排序 排序算法总结简单的排序冒泡排序 bubble sort选择排序 selection sort直接插入排序 straight insertion sort折半插入排序 binary insert sort复杂的排
2017-06-14 09:03:43 701
原创 剑指offer面试题汇总-Java实现
剑指offer面试题汇总-Java实现 说明:参考DERRANTCM的剑指offer学习专栏的排版。 DERRANTCM是我的学习榜样,他的博客给予我极大的帮助。感谢你!让我们一起分享知识,创造快乐!目录第01-10题面试题2 实现单例模式面试题3 二维数组中的查找面试题4 替换空格面试题5 从尾到头打印链表面试题6 重建二叉树面试题6 重建二叉树2面试题7 用两个栈实现队列面试题8 旋
2017-05-24 10:51:50 1674
原创 压测工具
压测工具文章目录压测工具Siege -- Mac 环境下压测工具ab -- Apache benchmarkwrkSiege – Mac 环境下压测工具使用方法:siege -c 并发数 -t 运行测试时间 URL要注意的是 -t 后面参数的单位,s 表示秒,默认是分钟。ab – Apache benchmark使用方法:ab -c 并发数 -n 请求数 URLwrk...
2019-03-07 22:34:47 452
原创 秋招面试算法汇总
秋招面试算法汇总排序算法汇总冒泡排序、选择排序、插入排序、堆排序、归并排序、快排、希尔排序【算法分析 + 源码】的地址是 https://github.com/lyz0907/java-core/tree/master/algorithm-core/src/main/java/algorithm/algorithm4/ch02_sort 树的非递归前序遍历、非递归中序遍历...
2018-07-17 22:14:31 534
原创 【Leetcode-Hard-124】Binary Tree Maximum Path Sum
【Leetcode-Hard-124】Binary Tree Maximum Path Sum题目Given a binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting node to any node in the t
2017-10-21 21:13:11 763
原创 【Leetcode-Medium-94】Binary Tree Inorder Traversal
【Leetcode-Medium-94】Binary Tree Inorder Traversal题目Given a binary tree, return the inorder traversal of its nodes’ values.For example: Given binary tree [1,null,2,3], 1 \ 2 / 3retur
2017-10-21 20:27:10 1151
原创 【Leetcode-Medium-22】Generate Parentheses
【Leetcode-Easy-22】Generate Parentheses题目Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ “((()))”,
2017-10-21 19:49:26 1360
原创 【Leetcode-Medium-583】Delete Operation for Two Strings
【Leetcode-Medium-583】Delete Operation for Two Strings题目Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where in each step you can delete one
2017-10-20 22:02:12 974
原创 【Leetcode-Medium-547】Friend Circles
Leetcode-Medium-547】Friend CirclesTODO: 对比2017-09-12去哪儿校招真题”六度人脉,最大的度”题目There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For exa
2017-10-20 21:38:33 763
原创 【Leetcode-Medium-238】Product of Array Except Self
【Leetcode-Easy-238】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 of nums except nu
2017-10-20 21:11:45 688
原创 【Leetcode-Medium-647】Palindromic Substrings
【Leetcode-Medium-647】Palindromic Substrings题目Given a string, your task is to count how many palindromic substrings in this string.The substrings with different start indexes or end indexes are counted
2017-10-20 20:06:57 810
原创 【Leetcode-Medium-494】Target Sum
【Leetcode-Medium-494】Target Sum题目You are given a list of non-negative integers, a1, a2, …, an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as i
2017-10-19 19:44:07 809
原创 【Leetcode-Medium-46】Permutations
【Leetcode-Medium-46】Permutations题目Given a collection of distinct numbers, return all possible permutations.For example, [1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [2,1,3],
2017-10-19 19:19:13 548
原创 【Leetcode-Medium338】Counting Bits
【Leetcode-Medium338】Counting Bits题目Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an
2017-10-19 19:06:28 907
原创 【Leetcode-Easy-155】 Min Stack
【Leetcode-Easy-155】 Min Stack题目Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) – Push element x onto stack. pop() – Removes the element on top
2017-10-19 15:27:11 711
原创 【Leetcode-Easy-160】Intersection of Two Linked Lists
【Leetcode-Easy-160】Intersection of Two Linked Lists题目Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A:
2017-10-19 15:06:57 630
原创 【Leetcode-Easy-234】Palindrome Linked List
【Leetcode-Easy-234】Palindrome Linked List题目Given a singly linked list, determine if it is a palindrome.Follow up: Could you do it in O(n) time and O(1) space?思路双指针找到链表的中间结点; 反转链表的后半部分; 比较链表的前半部分和“后半
2017-10-19 15:06:04 644
原创 【Leetcode-Easy-20】 Valid Parentheses
【Leetcode-Easy-20】 Valid Parentheses题目Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close in the correct order,
2017-10-19 15:05:12 985
原创 【Leetcode-Easy-141】Linked List Cycle
【Leetcode-Easy-141】Linked List Cycle题目Given a linked list, determine if it has a cycle in it.Follow up: Can you solve it without using extra space?思路快指针和慢指针程序/** * Definition for singly-linked list.
2017-10-19 15:03:27 636
原创 【Leetcode-Easy-110】Balanced Binary Tree
【Leetcode-Easy-110】Balanced Binary Tree题目Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the tw
2017-10-19 15:01:44 748
原创 【Leetcode-Easy-581】Shortest Unsorted Continuous Subarray
【Leetcode-Easy-581】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 w
2017-10-19 14:51:54 669
原创 【Leetcode-Easy-101】 Symmetric Tree
【Leetcode-Easy-101】 Symmetric Tree题目Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \
2017-10-18 15:16:54 929
原创 【Leetcode-Easy-198】House Robber
【Leetcode-Easy-198】House Robber题目You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing eac
2017-10-18 15:00:15 592
原创 【Leetcode-Easy-21】Merge Two Sorted Lists
【Leetcode-Easy-21】Merge Two Sorted Lists题目Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.思路巧用头结点(哑结点)程序/**
2017-10-18 14:27:45 841
原创 【Leetcode-Easy-53】Maximum Subarray
【Leetcode-Easy-53】Maximum Subarray题目Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4], the co
2017-10-18 14:18:33 1394
原创 【Leetcode-Easy-70】Climbing Stairs
【Leetcode-Easy-70】Climbing Stairs题目You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?No
2017-10-18 13:57:22 662
原创 【Leetcode-Easy-121】Best Time to Buy and Sell Stock
【Leetcode-Easy-121】Best Time to Buy and Sell Stock题目Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction
2017-10-18 13:31:05 632
原创 【Leetcode-Easy-169】 Majority Element
【Leetcode-Easy-169】 Majority Element题目Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-
2017-10-18 12:39:09 494
原创 【Leetcode-Easy-206】Reverse Linked List
【Leetcode-Easy-206】Reverse Linked List题目Reverse a singly linked list.思路双指针程序/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(in
2017-10-18 10:37:33 595
原创 【Leetcode-Easy-283】Move Zeroes
【Leetcode-Easy-283】Move Zeroes题目Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0,
2017-10-18 09:09:30 681
原创 【Leetcode-easy-448】Find All Numbers Disappeared in an Array
【Leetcode-easy-448】Find All Numbers Disappeared in an Array题目Given 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 o
2017-10-18 08:45:13 568
原创 入栈序列的所有出栈序列
入栈序列的所有出栈序列2017-09 涂鸦移动的电话面试题目题目一个入栈序列的所有出栈序列思路初级方法: 求出这个入栈序列的全排列,然后验证每一个序列是否是出栈序列。考查点:字符串的全排列,参考 剑指offer 面试题28 字符串的排列一个序列是否是入栈序列的出栈序列判断,参考 剑指offer 面试题22 栈的压入、弹出序列程序
2017-10-16 22:17:22 1915
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人