随笔分类 - C/C++
摘要:使用ctypes在Python中调用C++动态库 入门操作 使用ctypes库可以直接调用C语言编写的动态库,而如果是调用C++编写的动态库,需要使用 关键字对动态库的函数进行声明: 编译得到动态库,在Python代码中调用: 运行上述代码,得到输出: 尝试传递字符串参数 Python代码调用: 查
阅读全文
摘要:Longest Palindromic Subsequence 题解 题目来源:https://leetcode.com/problems/longest palindromic subsequence/description/ Description Given a string s, find
阅读全文
摘要:Single Number 题解 题目来源:https://leetcode.com/problems/single number/description/ Description Given an array of integers, every element appears twice exc
阅读全文
摘要:Trapping Rain Water 题解 题目来源:https://leetcode.com/problems/trapping-rain-water/description/ Description Given n non-negative integers representing an e
阅读全文
摘要:Sum 系列题解 Two Sum题解 题目来源:https://leetcode.com/problems/two sum/description/ Description Given an array of integers, return indices of the two numbers s
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Search in Rotated Sorted Array 系列题解 题目来源: "Search in Rotated Sorted Array" "Search in Rotated Sorted Array II" 第一版 Suppose an array sorted in ascendin
阅读全文
摘要:Recover Binary Search Tree 题解 题目来源:https://leetcode.com/problems/recover binary search tree/description/ Description Two elements of a binary search t
阅读全文
摘要:Flatten Binary Tree to Linked List 题解 题目来源:https://leetcode.com/problems/ Description Given a binary tree, flatten it to a linked list in place. Examp
阅读全文
摘要:Combinations 题解 题目来源:https://leetcode.com/problems/combinations/description/ Description Given two integers n and k, return all possible combinations
阅读全文
摘要:Merge Sorted Array 题解 题目来源:https://leetcode.com/problems/merge sorted array/description/ Description Given two sorted integer arrays nums1 and nums2,
阅读全文
摘要:Permutations II 题解 题目来源:https://leetcode.com/problems/permutations ii/description/ Description Given a collection of numbers that might contain duplic
阅读全文
摘要:Rotate Image 题解 题目来源:https://leetcode.com/problems/rotate image/description/ Description You are given an n x n 2D matrix representing an image. Rotat
阅读全文
摘要:Combination Sum 系列题解 题目来源:https://leetcode.com/problems/combination sum/description/ Description Given a set of candidate numbers ( C ) (without dupli
阅读全文
摘要:Implement strStr() 题解 题目来源:https://leetcode.com/problems/implement strstr/description/ Description Implement "strStr()" . Return the index of the firs
阅读全文
摘要:Plus One 题解 题目来源:https://leetcode.com/problems/plus one/description/ Description Given a non negative integer represented as a non empty array of digi
阅读全文
摘要:Minimum Depth of Binary Tree 题解 题目来源:https://leetcode.com/problems/minimum depth of binary tree/description/ Description Given a binary tree, find its
阅读全文
摘要:Permutations 题解 题目来源:https://leetcode.com/problems/permutations/description/ Description Given a collection of distinct numbers, return all possible p
阅读全文
摘要:Search for a Range 题解 题目来源:https://leetcode.com/problems/search for a range/description/ Description Given an array of integers sorted in ascending or
阅读全文

浙公网安备 33010602011771号