随笔分类 -  C/C++

摘要:使用ctypes在Python中调用C++动态库 入门操作 使用ctypes库可以直接调用C语言编写的动态库,而如果是调用C++编写的动态库,需要使用 关键字对动态库的函数进行声明: 编译得到动态库,在Python代码中调用: 运行上述代码,得到输出: 尝试传递字符串参数 Python代码调用: 查 阅读全文
posted @ 2018-07-11 21:56 言何午 阅读(2021) 评论(0) 推荐(0)
摘要:Longest Palindromic Subsequence 题解 题目来源:https://leetcode.com/problems/longest palindromic subsequence/description/ Description Given a string s, find 阅读全文
posted @ 2018-04-10 17:01 言何午 阅读(111) 评论(0) 推荐(0)
摘要:Single Number 题解 题目来源:https://leetcode.com/problems/single number/description/ Description Given an array of integers, every element appears twice exc 阅读全文
posted @ 2018-04-01 10:23 言何午 阅读(233) 评论(0) 推荐(0)
摘要:Trapping Rain Water 题解 题目来源:https://leetcode.com/problems/trapping-rain-water/description/ Description Given n non-negative integers representing an e 阅读全文
posted @ 2018-03-01 17:03 言何午 阅读(128) 评论(0) 推荐(0)
摘要:Sum 系列题解 Two Sum题解 题目来源:https://leetcode.com/problems/two sum/description/ Description Given an array of integers, return indices of the two numbers s 阅读全文
posted @ 2018-02-28 11:38 言何午 阅读(140) 评论(0) 推荐(0)
摘要:N Queens 系列题解 题目来源: "N Queens" "N Queens II" N Queens The n queens puzzle is the problem of placing n queens on an n×n chessboard such that no two que 阅读全文
posted @ 2018-02-27 00:00 言何午 阅读(160) 评论(0) 推荐(0)
摘要:Set Matrix Zeroes 题解 题目来源:https://leetcode.com/problems/set matrix zeroes/description/ Description Given a m x n matrix, if an element is 0, set its e 阅读全文
posted @ 2018-02-22 23:42 言何午 阅读(104) 评论(0) 推荐(0)
摘要:Search in Rotated Sorted Array 系列题解 题目来源: "Search in Rotated Sorted Array" "Search in Rotated Sorted Array II" 第一版 Suppose an array sorted in ascendin 阅读全文
posted @ 2018-02-22 11:57 言何午 阅读(117) 评论(0) 推荐(0)
摘要:Recover Binary Search Tree 题解 题目来源:https://leetcode.com/problems/recover binary search tree/description/ Description Two elements of a binary search t 阅读全文
posted @ 2018-02-21 16:06 言何午 阅读(149) 评论(0) 推荐(0)
摘要:Flatten Binary Tree to Linked List 题解 题目来源:https://leetcode.com/problems/ Description Given a binary tree, flatten it to a linked list in place. Examp 阅读全文
posted @ 2018-02-06 22:02 言何午 阅读(110) 评论(0) 推荐(0)
摘要:Combinations 题解 题目来源:https://leetcode.com/problems/combinations/description/ Description Given two integers n and k, return all possible combinations 阅读全文
posted @ 2018-02-06 15:55 言何午 阅读(122) 评论(0) 推荐(0)
摘要:Merge Sorted Array 题解 题目来源:https://leetcode.com/problems/merge sorted array/description/ Description Given two sorted integer arrays nums1 and nums2, 阅读全文
posted @ 2018-02-06 13:14 言何午 阅读(97) 评论(0) 推荐(0)
摘要:Permutations II 题解 题目来源:https://leetcode.com/problems/permutations ii/description/ Description Given a collection of numbers that might contain duplic 阅读全文
posted @ 2018-02-05 13:04 言何午 阅读(97) 评论(0) 推荐(0)
摘要:Rotate Image 题解 题目来源:https://leetcode.com/problems/rotate image/description/ Description You are given an n x n 2D matrix representing an image. Rotat 阅读全文
posted @ 2018-02-05 09:40 言何午 阅读(106) 评论(0) 推荐(0)
摘要:Combination Sum 系列题解 题目来源:https://leetcode.com/problems/combination sum/description/ Description Given a set of candidate numbers ( C ) (without dupli 阅读全文
posted @ 2018-02-04 19:54 言何午 阅读(163) 评论(0) 推荐(0)
摘要:Implement strStr() 题解 题目来源:https://leetcode.com/problems/implement strstr/description/ Description Implement "strStr()" . Return the index of the firs 阅读全文
posted @ 2018-02-04 16:04 言何午 阅读(115) 评论(0) 推荐(0)
摘要:Plus One 题解 题目来源:https://leetcode.com/problems/plus one/description/ Description Given a non negative integer represented as a non empty array of digi 阅读全文
posted @ 2018-02-03 13:32 言何午 阅读(129) 评论(0) 推荐(0)
摘要:Minimum Depth of Binary Tree 题解 题目来源:https://leetcode.com/problems/minimum depth of binary tree/description/ Description Given a binary tree, find its 阅读全文
posted @ 2018-02-03 11:42 言何午 阅读(101) 评论(0) 推荐(0)
摘要:Permutations 题解 题目来源:https://leetcode.com/problems/permutations/description/ Description Given a collection of distinct numbers, return all possible p 阅读全文
posted @ 2018-02-03 11:26 言何午 阅读(135) 评论(0) 推荐(0)
摘要:Search for a Range 题解 题目来源:https://leetcode.com/problems/search for a range/description/ Description Given an array of integers sorted in ascending or 阅读全文
posted @ 2018-02-03 10:31 言何午 阅读(196) 评论(0) 推荐(0)