自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

朝着梦想前行。

不拼博 枉少年!

  • 博客(73)
  • 资源 (1)
  • 收藏
  • 关注

原创 leetcode 713. Subarray Product Less Than K & leetcode 467. Unique Substrings in Wraparound String

写在前面两道类似的题目,解法不一样(哭笑不得.jpg),一道用slidingwindow解,一道DP。713. Subarray Product Less Than K题目描述Your are given an array of positive integers nums.Count and print the number of (contiguous) subar...

2018-03-02 21:30:46 388

原创 最小堆的C++实现

写在前面闲来无事写了个C++版本的最小堆,堆的底层采用数组,基本的上浮和下沉过程请参考算法导论,非常简单。这里不再画图解释,具体的实现代码如下。代码实现template<typename T>class PriorityQueue {private: vector<T> heap;public: PriorityQueue() { ...

2018-02-27 13:18:56 934

原创 A* 寻路算法

写在前面再来填一个坑。之前一直说要写的A* 终于有空补上了,本篇博客首先会介绍最基础的A* 实现,在简单A* 的基础上,尝试实现稍复杂的A* 算法(带有高度信息的地形,允许对角线寻路等)。A*算法简介本博客不准备探讨A* 算法的原理,这里仅仅对A*算法做一个简单介绍,对具体原理感兴趣的同学请查阅相关资料。A* 算法是一种启发式搜索算法。本质上来讲,可以算作是广度优先搜索算法的改

2018-02-03 15:27:58 3497

原创 leetcode 773. Sliding Puzzle

写在前面好久没写算法题题解了,实在太忙了。每周的contest都有在做,本周的contest 第二题第三题都算比较有趣的题目,也都A了,先整理一下第三题的解题思路。题目描述On a 2x3 board, there are 5 tiles represented by the integers 1 through 5, and an empty square represented b

2018-01-28 18:01:11 1833

原创 状态模式与有限状态机 &行为树(游戏开发)

写在前面 - (更新)游戏AI的实现通常分为两种,有限状态机(FSM)以及行为树,我们这里首先将有限状态机应用到游戏《古月》的怪物AI设计中,在之后的版本中再用行为树替换有限状态机。 2018.1.11更新 目前正在写行为树的实现,预计本周内完成行为树的设计,会更新在博客中,博主目前找到了武汉胡莱游戏的实习工作,预计会实习到6月份,希望能够有所提升。有限状态机(FSM)我们知

2017-12-26 00:03:24 6058 2

原创 leetcode 486. Predict the Winner

leetcode 486

2017-12-07 11:02:45 287

原创 leetcode 343. Integer Break

leetcode 343. Integer Break

2017-11-15 22:07:11 186

原创 leetcode 23. Merge k Sorted Lists

leetcode 23. Merge K Sorted Lists

2017-10-14 19:57:01 256

原创 leetcode 653. Two Sum IV - Input is a BST

leetcode 653. Two Sum IV - Input is a BST

2017-10-14 19:06:11 301

原创 leetcode 540. Single Element in a Sorted Array

leetcode 540. Single Element in a Sorted Array

2017-10-14 18:05:03 272

原创 leetcode 406. Queue Reconstruction by Height

leetcode 406. Queue Reconstruction by Height

2017-10-09 23:02:11 230

原创 隐式类型转换与非成员函数(effective C++ 条款24&46)

隐式类型转换,运算符重载

2017-09-28 21:33:20 365

原创 leetcode 684. Redundant Connection

leetcode 684. Redundant Connection

2017-09-25 11:37:19 1184 1

原创 private 继承(effective C++ 条款40)

private继承

2017-09-24 18:18:57 328

原创 拓扑排序

拓扑排序的DFS解法

2017-09-23 22:45:35 418

原创 leetcode 229. Majority Element II

leetcode 229 Majority Element II

2017-09-22 21:10:18 268

原创 leetcode 552. Student Attendance Record II & 600. Non-negative Integers without Consecutive Ones

leetcode 552. Student Attendance Record II & 600. Non-negative Integers without Consecutive Ones

2017-09-15 21:54:36 398

原创 C++ swap函数(effective C++ 条款25)

swap,std::swap

2017-09-14 23:32:30 8482

原创 leetcode 673. Number of Longest Increasing Subsequence

contest 49 LIS

2017-09-10 21:18:34 1701

原创 leetcode 316. Remove Duplicate Letters

leetcode 316 remove duplicate letters

2017-09-09 15:27:28 280

原创 leetcode 236. Lowest Common Ancestor of a Binary Tree

leetcode 236

2017-09-07 15:27:14 304

原创 C++ copy and swap (拷贝交换技术)

拷贝交换技术

2017-09-06 15:03:20 5543 3

原创 leetcode 666. Path Sum IV

leetcode 666 contest 43

2017-09-01 17:22:02 1393

原创 leetcode 25. Reverse Nodes in k-Group & leetcode 92. Reverse Linked List II

leetcode 25. Reverse Nodes in k-Group

2017-08-28 19:47:20 348

原创 leetcode 667. Beautiful Arrangement II

leetcode 667. Beautiful Arrangement II

2017-08-28 19:37:33 2357

原创 leetcode 34. Search for a Range (binary search std::lower_bound)

leetcode 34. search for a range

2017-08-24 11:45:10 286

原创 leetcode 480. Sliding Window Median

leetcode 480. Sliding Widow Median

2017-08-22 20:24:34 825

原创 leetcode 330. Patching Array

leetcode 330. Patching Array

2017-08-03 13:22:32 245

原创 vector::erase & map::erase (C++11)

vector::erase & map::erase

2017-08-02 10:50:55 2593 4

原创 leetcode 650. 2 Keys Keyboard

leetcode 650. 2 Keys Keyboard

2017-07-30 13:45:46 1582 1

原创 leetcode 219. Contains Duplicate II

leetcode 219. Contains Duplicate II

2017-07-28 18:47:26 238

原创 leetcode 354. Russian Doll Envelopes & leetcode 300 Longest Increasing Subsequence

leetcode 354. Russian Doll Envelopes & leetcode 300 Longest Increasing Subsequence

2017-07-28 15:08:51 272

原创 leetcode 363. Max Sum of Rectangle No Larger Than K

leetcode 363 Max Sum of Rectangle No Larger Than K

2017-07-22 21:58:41 352

原创 leetcode 131. Palindrome Partitioning

leetcode 131 palindrome partitioning

2017-07-20 23:52:47 223

原创 leetcode 436. Find Right Interval

leetcode 436 find right interval

2017-07-19 10:08:47 293

原创 leetcode 438. Find All Anagrams in a String& 滑动窗口

滑动窗口,字符串匹配,哈希

2017-07-11 16:49:45 1228 1

原创 leetcode 560. Subarray Sum Equals K & leetcode 1. Two Sum

leetcode 560. Subarray Sum Equals K & leetcode 1. Two Sum

2017-07-05 21:34:12 1449

原创 leetcode 390. Elimination Game

leetcode 390

2017-06-22 23:47:15 604 1

原创 leetcode 625. Minimum Factorization

leetcode 625

2017-06-21 23:27:20 1053

原创 leetcode 621 Task Scheduler

leetcode 621

2017-06-21 23:08:20 4225 7

ssd8 Exam2 标准答案 运行完全正确

这个是自己做的ssd8的exam2 测试完全正确 大家共同学习共同进步

2014-01-04

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除