qbt4juik
码龄12年
关注
提问 私信
  • 博客:75,193
    社区:101
    75,294
    总访问量
  • 134
    原创
  • 1,377,093
    排名
  • 5
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:上海市
  • 加入CSDN时间: 2012-09-09
博客简介:

qbt4juik的专栏

查看详细资料
个人成就
  • 获得0次点赞
  • 内容获得2次评论
  • 获得0次收藏
创作历程
  • 57篇
    2016年
  • 21篇
    2015年
  • 59篇
    2014年
成就勋章
TA的专栏
  • Leetcode
    112篇
  • Python
    4篇
  • 项目
    1篇
  • Interview
    7篇
  • Machine Learning
    6篇
  • 数据结构
    14篇
  • Linux
    2篇
  • Shell
    2篇
  • Thread
    1篇
创作活动更多

仓颉编程语言体验有奖征文

仓颉编程语言官网已上线,提供版本下载、在线运行、文档体验等功能。为鼓励更多开发者探索仓颉编程语言,现诚邀各位开发者通过官网在线体验/下载使用,参与仓颉体验有奖征文活动。

368人参与 去创作
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

【Leetcode】Integer Break

Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.For example, given n = 2, ret
原创
发布博客 2016.09.12 ·
430 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Largest Divisible Subset

Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj = 0 or Sj % Si = 0.If there are multiple solution
原创
发布博客 2016.09.11 ·
384 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Same Tree

Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value./** * Def
原创
发布博客 2016.04.01 ·
419 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Reverse Words in a String II

Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters.The input string does not contain leading or trailing spaces and the words are alway
原创
发布博客 2016.04.01 ·
432 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

学了一招合并几万个文件

之前都知道合并,单纯的 cat * > merged_file 就可以了,但是今天要出了几万个文件就会报错,所以我研究了一下怎么办。第一个人说可以利用xargs,但是失败了。。。我也不知道为什么,知道的朋友告诉我一下,我看着还挺有道理的:ls | xargs -n 32 -P 8 cat >> ../saved_output第二个这个work了,非常精彩:  ls |  whi
原创
发布博客 2016.02.25 ·
407 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】House Robber II

After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time, all houses at this place are arranged in a ci
原创
发布博客 2016.02.22 ·
379 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】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 each of them is that adjacent house
原创
发布博客 2016.02.19 ·
358 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Binary Tree Level Order Traversal I/II AND Binary Tree Zigzag Level Order Traversal

看这篇文章的朋友们建议先看一下我的上一篇文章,讲的非常清楚我们面对“level”的问题的时候我们要怎么写代码处理,再强调一次每次BFS在里面的时候,一定要手写int size= queue.size(),因为queue一直是dynamic的!!!ok,第一二问的Binary Tree Level Order Traversal 其实是一样的。一、Given a binary
原创
发布博客 2016.02.12 ·
359 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】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.For example:Given the following binary tree, 1
原创
发布博客 2016.02.12 ·
314 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Populating Next Right Pointers in Each Node I, II

Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointer to point to its next right node.
原创
发布博客 2016.02.09 ·
308 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Two Problems: Convert Sorted Array/List to Binary Search Tree

First let's try easier one:Given an array where elements are sorted in ascending order, convert it to a height balanced BST.The logic is very simple: Every time you find the middle element and p
原创
发布博客 2016.02.08 ·
488 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.————————————————————————最近准备开始
原创
发布博客 2016.02.08 ·
322 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Sum up - Java Thread Interview Questions (Updating)

Java Thread Interview Questions1.     Difference between Thread and Process in Java?Thread is subset of Process, in other words one processcan contain multiple threads. Two process runs on differe
原创
发布博客 2016.02.06 ·
379 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Sum up - Linux Interview Questions (Updating)

Linux / Shell  interview questions 1.    Write a command that will look for files with anextension “c”, and has the occurrence of the string “apple” in it.Find ./ -name “*.c” | xargs grep –i “ap
原创
发布博客 2016.02.06 ·
444 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Dynamic Programming for Brother Du

Let's see an example to understand what is dynamic programming.Alice is located in the North-West (Top-Left) block of her city, which has the form of a gird of NxNNxN blocks. On each block the
原创
发布博客 2016.02.05 ·
637 阅读 ·
0 点赞 ·
1 评论 ·
0 收藏

Greatest Common Divisor 最大公约数 O(n)

不废话,直接上代码package testAndfun;//great common divisorpublic class gcd { public static void main(String[] args){ gcd g = new gcd(); int[] input = {16,64,26,78}; System.out.println(g.getGCD(inp
原创
发布博客 2016.02.04 ·
537 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LFU Cache

与LRU不同LFU关注与出现的频率,然后想自己写一个,区别在于:如果是LRU,假如capacity是2:输入是ABCBBBBBBCAA,那么最后会剩下的是C和A在缓存里。但是如果是LFU,capacity也是2:输入是ABCBBBBBBCAA,最后剩下的是[A,B],因为B出现的频率高。也就是说就算之前因为频率低被淘汰了,后面又出现了也要再回来。所以我想的设计方案是,整个LFUCach
原创
发布博客 2016.02.04 ·
2332 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Merge Two Linked List

Given 1-3-5-6-8, 2-4-9, you want to merge to 1-2-3-4-5-6-8-9.My solution is very naive solution that actually build a new linkedlist, require space O(n).public ListNode mergeTwoLists(ListNode l1,
原创
发布博客 2016.02.03 ·
343 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

K Closest Points

Given (0,0) as the centre and an array containing pair of coordinate such that (1,1)(-2,4)(3,4)(-11,5)...(x,y).If ask you return k closest points, how would you do it?import java.util.
原创
发布博客 2016.02.03 ·
516 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Reverse Half LinkedList

1-2-3-4-5-6 into 1-2-3-6-5-4 or 1-2-3-4-5 into 1-2-5-4-3I took advantage of reversing a linkedlist.I provided main func and prinf func.package testAndfun;public class reverseHalfLinkedList {
原创
发布博客 2016.02.03 ·
348 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多