自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

一只奋斗的小虫的博客

记录并分享下每一个学习的过程~~

  • 博客(28)
  • 收藏
  • 关注

原创 【confluent-kafka-go交叉编译】MacOS编译linux可执行文件

由于引入了github.com/confluentinc/confluent-kafka-go/kafka,需要在macos上面编译出linux的可执行文件。

2023-04-11 11:04:53 322

原创 【leetcode】【Golang】【剑指offer】【面试题10-I — 斐波那契数列】

一、题目描述写一个函数,输入 n ,求斐波那契(Fibonacci)数列的第 n 项。斐波那契数列的定义如下:F(0) = 0, F(1) = 1F(N) = F(N - 1) + F(N - 2), 其中 N > 1斐波那契数列由 0 和 1 开始,之后的斐波那契数就是由之前的两数相加而得出。答案需要取模 1e9+7(1000000007),如计算初始结果为:1000000...

2020-04-10 17:23:57 299

原创 【leetcode】【Golang】【剑指offer】【面试题06 — 从尾到头打印链表】

一、题目描述输入一个链表的头节点,从尾到头反过来返回每个节点的值(用数组返回)。示例 1:输入:head = [1,3,2]输出:[2,3,1]限制:0 <= 链表长度 <= 10000二、题目分析个人思路:**法一:**遍历链表将值暂存在数组中,由于顺序原因需要进行反转。**法二:**遍历链表将值暂存在数组中,存储时就将顺序进行反序存储。三、golang...

2020-04-10 16:12:46 244

原创 【leetcode】【Golang】【剑指offer】【面试题05 — 替换空格】

一、题目描述请实现一个函数,把字符串 s 中的每个空格替换成"%20"。示例 1:输入:s = “We are happy.”输出:“We%20are%20happy.”限制:0 <= s 的长度 <= 10000二、题目分析个人思路:用go提供的range关键字使用去循环遍历字符串进行替换处理就ok。需要注意的是:go语言没有char类型,在range循环...

2020-04-10 15:22:12 165

原创 【leetcode】【Golang】【剑指offer】【面试题03 — 数组中重复的数字】

一、题目描述在一个长度为 n 的数组 nums 里的所有数字都在 0~n-1 的范围内。数组中某些数字是重复的,但不知道有几个数字重复了,也不知道每个数字重复了几次。请找出数组中任意一个重复的数字。示例 1:输入:[2, 3, 1, 0, 2, 5, 3]输出:2 或 3限制:2 <= n <= 100000二、题目分析个人思路:比较简单就是先排序,然后循环...

2020-04-10 10:02:28 166

原创 【leetcode】【Golang】【240】【搜索二维矩阵 II】

一、题目描述编写一个高效的算法来搜索 m x n 矩阵 matrix 中的一个目标值 target。该矩阵具有以下特性:每行的元素从左到右升序排列。每列的元素从上到下升序排列。示例:现有矩阵 matrix 如下:[[1, 4, 7, 11, 15],[2, 5, 8, 12, 19],[3, 6, 9, 16, 22],[10, 13, 14, 17, 24...

2020-04-09 19:26:19 159

原创 【leetcode】【Golang】【剑指offer】【面试题04 二维数组中的查找】

一、题目描述在一个长度为 n 的数组 nums 里的所有数字都在 0~n-1 的范围内。数组中某些数字是重复的,但不知道有几个数字重复了,也不知道每个数字重复了几次。请找出数组中任意一个重复的数字。示例 1:输入:[2, 3, 1, 0, 2, 5, 3]输出:2 或 3限制:2 <= n <= 100000二、题目分析个人思路:比较简单就是先排序,然后循环排序结果。...

2020-04-09 11:44:21 148

原创 【Go语言基础】纯个人学习基础点记录

目录一、前言二、学习与记录1、Go简易教程:http://go-tour-zh.appspot.com/一、前言不同人对不同知识的学习掌握程度是不一样的,各自的知识盲点也是不同的。这篇文章主要用于个人记录Go语言知识学习过程中的盲点。如果能帮到你,记得点个赞哦;如果有不足or错误,请留言评论哦。谢谢大家~二、学习与记录1、(20200407)Go简易教程:http://...

2020-04-08 10:54:03 158

原创 【python】【leetcode】【算法题目338—Counting Bits】

一、题目描述题目原文:Given a non negative integer numbernum. For every numbersiin the range0 ≤ i ≤ numcalculate the number of 1's in their binary representation and return them as an array.(给出一个非负整数n

2020-04-07 15:35:20 136

原创 couchbase view相关概念

view概念学习笔记:view只针对json格式的文件进行,非json格式的数据将跳过。view将遍历bucket中每条数据。view编写好后首次建立结果返回时间很长,但数据增加或更新时结果返回很快。(全量查询时)stale参数尽量设置为true,使得view会自动更新结果(每updateInterval默认为5000毫秒去查询是否达到updateMinChanges默认5000次数据决...

2019-11-11 18:01:30 542

原创 【Java】【leetcode】【题目657 - Judge Route Circle 判断路线成圈】

【Java】【leetcode】【题目657 - Judge Route Circle 判断路线成圈】一、题目描述  初始位置 (0, 0) 处有一个机器人。给出它的一系列动作,判断这个机器人的移动路线是否形成一个圆圈,换言之就是判断它是否会移回到原来的位置。   移动顺序由一个字符串表示。每一个动作都是由一个字符来表示的。机器人有效的动作有 R(右),L(左),U(上)和 D(下)...

2018-05-15 09:06:55 272

原创 JAVA-异常-知识点总结

JAVA-异常-知识点总结  本篇博客内容如题目所示,在题主进一步学习与复习JAVA知识时,进行了知识点总结,相当于个人笔记,大多数是个人理解后的大白话,有不妥之处请各位大佬留言交流~    另外,学习参考资料为《Java核心技术卷I》和毕向东老师的Java视频学习。异常概述  简单地说,异常就是在程序运行期间产生的错误,个人理解为:程序没有按照自己的想法进行而产生的错误。Jav...

2018-03-01 16:31:40 1163

原创 小白教你如何用Django+uwsgi+Nginx+腾讯云ubuntu服务器部署项目

背景  本篇博客内容如题目所示,背景是前几天帮老师写了一个非常小的项目,大概是让学生的家长可以登陆网址查阅孩子们的成绩,前因后果就不在啰嗦了。在写完Django成绩查询小项目后,面临着项目的部署问题。在反复跳进各种坑、查阅了各种技术说明文档和很多大牛的博客后成功地进行了部署,把部署过程记录如下。当然,本人编程小白一枚,如果在以下内容中有错误或者描述不当的地方,请各位大佬留言指正~   另外,

2018-02-01 15:14:54 5629 7

原创 【python】【leetcode】【算法题目64—Minimum Path Sum】

题目描述题目原文:Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either d

2017-09-12 09:45:12 1030

原创 【python】【leetcode】【算法题目167—Two Sum II - Input array is sorted】

一、题目描述题目原文:Given an array of integers that is alreadysorted in ascending order, find two numbers such that they add up to a specific target number.The function twoSum should return indi

2016-12-04 14:51:39 452

原创 【python】【leetcode】【算法题目387—First Unique Character in a String】

一、题目描述题目原文:Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.(输入一个字符串,给出此串中非重复的字符,并返回其下标,若不存在则返回-1)二、题目分析

2016-12-04 14:18:57 1078

原创 【python】【leetcode】【算法题目12—Integer to Roman】

一、题目描述题目原文:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.(给出数字1~3999中的一个数字,把它转化为罗马数字输出)二、题目分析思路:建立一个字典,将

2016-12-04 13:14:55 720

原创 【python】【leetcode】【算法题目383—Ransom Note】

一、题目描述题目原文:Given an arbitrary ransom note string and another string containing letters from all the magazines, write a functionthat will return true if the ransom note can be construct

2016-12-04 12:35:39 619

原创 【python】【leetcode】【算法题目283—Palindrome Number】

一、题目描述题目原文:Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.(输入一个数字列表,我们要把所有的0元后置,并要保持非0元的原顺序)举例

2016-12-04 12:23:49 267

原创 【python】【leetcode】【算法题目389—Find the Difference】

一、题目描述题目原文:Given two stringssandtwhich consist of only lowercase letters.Stringtis generated by random shuffling stringsand then add one more letter at a random position.Find

2016-12-04 12:03:33 661

原创 【python】【leetcode】【算法题目412—Fizz Buzz】

一、题目描述题目原文:Write a program that outputs the string representation of numbers from 1 ton.But for multiples of three it should output “Fizz” instead of the number and for the multiples of

2016-12-04 11:24:31 1394

原创 【python+Java】【leetcode】【算法题目344—Reverse String】

一、题目描述题目原文:Write a function that takes a string as input and returns the string reversed.(反转输出字符串)举例:Given s = "hello", return "olleh".二、题目分析思路1:用python中切片的

2016-11-28 17:18:01 297

原创 【python】【leetcode】【算法题目9—Palindrome Number】

题目原文:Determine whether an integer is a palindrome. Do this without extra space.(不用额外的空间来判断一个整形数字是不是回文数)Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to string, note the restriction of using ex

2016-11-28 11:37:37 579

原创 【python】【leetcode】【算法题目6—ZigZag Conversion】

一、题目描述题目原文:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this:(you may want to display this pattern in a fixed font for better legibility)

2016-11-26 15:44:31 1521

原创 【python】【leetcode】【算法题目4—Median of Two Sorted Arrays】

一、题目描述题目原文:There 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+n)).

2016-11-23 09:21:40 415

原创 【python】【leetcode】【算法题目7—Reverse Integer】

一、题目描述题目原文:Reverse digits of an integer.(将一个整数反转输出)举例:Example1:x = 123, return 321Example2:x = -123, return -321注意:If the integer's last digit is 0,

2016-11-21 13:34:22 405

原创 【python】【leetcode】【算法题目2—Add Two Numbers】

一、题目描述题目原文:You are given two linked lists representing two non-negative numbers.The digits are stored in reverse order and each of their nodes contain a single digit.Add the two numbers an...

2016-11-21 12:05:45 5762 9

原创 【python】【leetcode】【算法题目1—Two Sum】

【python】【leetcode】【算法题目1—Two Sum】Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution.输入一个整型列表,以及一个目标值,返回该列表中加和为目标值的两个数的下标

2016-11-21 09:22:43 310

空空如也

空空如也

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

TA关注的人

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