关闭

[置顶] PyQt 分离UI主线程与工作线程

本文主要用于入门PyQt的多线程操作,包括传参数和有返回值的多线程,用到了Qt的信号和槽。有简单又具体的代码作例子用于讲解。...
阅读(9247) 评论(9)

287. Find the Duplicate Number

287. Find the Duplicate Number题目Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist....
阅读(150) 评论(0)

微信小程序踩坑记录

中文图片路径问题 当图片名为中文的时候,在开发者工具上,Iphone设备,或用于底部Tab栏上,显示正常。在安卓设备且用于页面中是,图片网址返回404错误(要手动binderror并打印事件才能发现)。 建议:自动log这些错误。 开发者工具缩放问题 开发者工具中,按CTRL加滚轮是会缩放的,而且不知道缩放比是多少,而且预览内容不会缩放,但是框会(放大试试就知道)。当发现内容怎么都不能居中时,...
阅读(269) 评论(0)

8.12 k-生成树(k-SPANNING TREE)证明 等题

8.12原题输入:无向图G=(V, E) 输出:G的一个生成树,其中所有的节点度数都不超过k——如果该树存在。 请证明对任意k>=2: (a)k-生成树问题是一个搜索问题。 (b)k-生成树问题是NP-完全的。(提示:由k=2开始,考虑该问题与Rudrata路径问题的关联。)...
阅读(322) 评论(0)

96. Unique Binary Search Trees 等题

96. Unique Binary Search Trees原题:Given n, how many structurally unique BST' s (binary search trees) that store values 1…n?For example, Given n = 3, there are a total of 5 unique BST' s....
阅读(253) 评论(0)

63. Unique Paths II 等题

62. Unique Paths原题: A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right at any point in time. The robot is......
阅读(186) 评论(0)

304. Range Sum Query 2D - Immutable 等题

303. Range Sum Query原题: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example:Given nums = [-2, 0, 3, -5, 2, -1]sumRange(0, 2) -> 1...
阅读(215) 评论(0)

92. Reverse Linked List II 等题

206. Reverse Linked List原题: Reverse a singly linked list.题解: 用递归很容易解决这个问题,几个问题,要先获取最后一个元素(未来的首元素),复杂度为O(n)。递归一遍,复杂度为O(2n)。总复杂度为O(n)。代码:...
阅读(167) 评论(0)

98. Validate Binary Search Tree

98. Validate Binary Search Tree原题: Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keys...
阅读(216) 评论(0)

112. Path Sum I & II

112. Path Sum原题: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum....
阅读(225) 评论(0)

455. Assign Cookies 等贪心题

455. Assign Cookies原题: Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi...
阅读(497) 评论(0)

343. Integer Break 等

343. 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....
阅读(258) 评论(0)

Wkhtmltopdf Installation on Centos 7 Server

最近在Centos7 服务器上运行Flask应用,用到了把html转成pdf的功能,便使用了wkhtmltopdf库。但在部署上服务器后出现了无法运行该库,报错wkhtmltopdf: cannot connect to X server,并且生成的pdf文字为方块乱码的问题。...
阅读(1929) 评论(0)

30. Substring with Concatenation of All Words

原题 You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactl...
阅读(235) 评论(0)

313. Super Ugly Number

原题 Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes of size k. For example, [1, 2, 4, 7, 8...
阅读(282) 评论(0)

23. Merge k Sorted Lists等题 第二周解题报告

原题Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity....
阅读(552) 评论(0)
23条 共2页1 2 下一页 尾页
    个人资料
    • 访问:32617次
    • 积分:560
    • 等级:
    • 排名:千里之外
    • 原创:22篇
    • 转载:1篇
    • 译文:0篇
    • 评论:15条
    文章分类
    最新评论