leetcode 718. Maximum Length of Repeated Subarray
摘要:Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Input: A: [1,2,3,2,1] B: [3,2,1,4,7
阅读全文
posted @
2017-10-31 13:42
Beserious
阅读(205)
推荐(0)
leetcode 443. String Compression
摘要:Given an array of characters, compress it in place. The length after compression must always be smaller than or equal to the original array. Every ele
阅读全文
posted @
2017-10-31 13:40
Beserious
阅读(768)
推荐(0)
leetcode 717. 1-bit and 2-bit Characters
摘要:We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11). N
阅读全文
posted @
2017-10-31 13:37
Beserious
阅读(300)
推荐(0)
linux 压缩和解压
摘要:zip压缩和解压 zipd的优势就是跨平台 tar压缩和解压 TAR.GZ 压缩和解压 这种格式在压缩时不会占用太多CPU的,而且可以得到一个非常理想的压缩率。使用下面这种格式去压缩一个目录: TAR.BZ2压缩和解压 这种压缩格式是所有方式中压缩率最好的。它比前面的方式要占用更多的CPU与时间。
阅读全文
posted @
2017-10-31 13:31
Beserious
阅读(259)
推荐(0)
ubuntu16.04和服务器 caffe 安装
摘要:在centos6.X上安装caffe 0.编译安装gcc4.8.5 由于centos6.x中的gcc版本老旧,不支持c++11所以要安装gcc4.8.5,以下是安装教程。参考 "CentOS 6.4 编译安装 gcc 4.8.0" 解压安装包进入目录执行download_prerequisites脚
阅读全文
posted @
2017-10-31 13:30
Beserious
阅读(1748)
推荐(0)
leetcode 48. Rotate Image
摘要:You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in place, which
阅读全文
posted @
2017-10-23 09:45
Beserious
阅读(140)
推荐(0)
leetcode 19. Remove Nth Node From End of List
摘要:Given a linked list, remove the nth node from the end of list and return its head. For example, Note: Given n will always be valid. Try to do this in
阅读全文
posted @
2017-10-22 14:13
Beserious
阅读(132)
推荐(0)
leetcode 692. Top K Frequent Words
摘要:Given a non empty list of words, return the k most frequent elements. Your answer should be sorted by frequency from highest to lowest. If two words h
阅读全文
posted @
2017-10-21 19:10
Beserious
阅读(332)
推荐(0)
leetcode 36. Valid Sudoku
摘要:Determine if a Sudoku is valid, according to: Sudoku Puzzles The Rules. The Sudoku board could be partially filled, where empty cells are filled with
阅读全文
posted @
2017-10-20 14:37
Beserious
阅读(104)
推荐(0)
leetcode 416. Partition Equal Subset Sum
摘要:Given a non empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both
阅读全文
posted @
2017-10-20 14:00
Beserious
阅读(97)
推荐(0)
leetcode 696. Count Binary Substrings
摘要:Give a string s, count the number of non empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th
阅读全文
posted @
2017-10-16 17:08
Beserious
阅读(258)
推荐(0)
leetcode 74. 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 f
阅读全文
posted @
2017-10-11 13:33
Beserious
阅读(94)
推荐(0)
leetcode 199. Binary Tree Right Side View
摘要:Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
阅读全文
posted @
2017-10-11 10:41
Beserious
阅读(105)
推荐(0)
leetcode 43. Multiply Strings
摘要:Given two non negative integers num1 and num2 represented as strings, return the product of num1 and num2. Note: The length of both num1 and num2 is v
阅读全文
posted @
2017-10-10 22:56
Beserious
阅读(102)
推荐(0)
leetcode 257. Binary Tree Paths
摘要:Given a binary tree, return all root to leaf paths. 题目大意: 输出二叉树的所有路径 思路: 先序遍历,记录路径。为了回溯,临时存储路径的数据结构得具有弹出最后一个元素的功能,我的代码里面用的是vector
阅读全文
posted @
2017-10-10 22:54
Beserious
阅读(115)
推荐(0)
leetcode 695. Max Area of Island
摘要:Given a non empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4 directionally (horizontal or vertical.) Yo
阅读全文
posted @
2017-10-10 22:54
Beserious
阅读(320)
推荐(0)
leetcode 694. Number of Distinct Islands
摘要:Given a non empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4 directionally (horizontal or vertical.) Yo
阅读全文
posted @
2017-10-08 11:21
Beserious
阅读(863)
推荐(0)
ros使用时的注意事项&技巧2
摘要:1.查看参数列表 rosparam list 2.查询参数rosparam get parameter_name,如rosparam get /rosdistro 3.设置参数rosparam set parameter_name parameter_value 4.运行turtlesim_node
阅读全文
posted @
2017-10-07 16:28
Beserious
阅读(4844)
推荐(0)
ros使用时的注意事项&技巧
摘要:1.rosrun package name executable name 比如 rosrun turtlesim turtlesim_node 2.一旦启动roscore后,便可以运行ROS程序了。ROS程序的运行实例被称为节点(node),roscore叫做节点管理器 3.查看节点列表rosno
阅读全文
posted @
2017-10-05 17:02
Beserious
阅读(17207)
推荐(1)
leetcode 687. Longest Univalue Path
摘要:Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the roo
阅读全文
posted @
2017-10-03 21:29
Beserious
阅读(842)
推荐(0)
leetcode 686. Repeated String Match
摘要:Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return 1. For
阅读全文
posted @
2017-10-03 17:39
Beserious
阅读(372)
推荐(0)