自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

zZZZZZ的博客

记录心得,分享知识,共同成长。

  • 博客(9)
  • 资源 (2)
  • 问答 (1)
  • 收藏
  • 关注

原创 TSP之动态规划找最优解

动态规划解决TSP问题 假设p0,p1,p2...pn-1是从p0到pn-1的最短路径,则p1,p2...pn-1也是最短路径。 pi:点i d(i,v):从i经过点集合v所有点的最短路径长度 c(i,j):从i到j的距离花费 目的:求d(0,v)最短路径和长度 v=空集, d(0,v)=0 v不等于空集,d(0,v)=min{c(0,i)+d(i,v-{i})} i属于v#include <windows.h>#includ...

2020-05-12 17:10:37 930 1

原创 (WPF)自己实现发布订阅管理类,彻底解耦发布者和订阅者

工作中一个项目用到微软的Microsoft.Practices.Prism.PubSubEvents.dll里的发布订阅工具类,实现viewmodel之间的通信,奈何项目升级的时候升级工具不支持这么长名字的dll,我们也知道dll文件的名字和dll程序集名是强关联的,文件名不能随意改变,否则编译可以通过,运行的时候是按程序集名+.dll后缀去寻找dll路径的,必然会导致无法找到引用文件错误。那么没...

2018-08-11 08:24:48 1627

原创 LeetCode.950

public class Solution { public bool HasGroupsSizeX(int[] deck) { Dictionary&lt;int, int&gt; dic = new Dictionary&lt;int, int&gt;(); bool[] visit = new bool...

2018-09-30 17:47:28 272

原创 LeetCode.104. Maximum Depth of Binary Tree

public class Solution { private void TraverseNode(TreeNode node) { if (node == null) { return; } if (node.val &gt; max_dept...

2018-09-14 08:47:33 106

原创 LeetCode.7: Reverse Integer

my answer in CSharp codes:public int Reverse(int x) { string value = x.ToString(); string a = ""; if (value.ElementAt(0).Equals('-')) { ...

2018-09-13 22:37:31 125

原创 LeetCode.872: Leaf-Similar Trees

Two binary trees are considered leaf-similar if their leaf value sequence is the same.Return true if and only if the two given trees with head nodes root1 and root2 are leaf-similar. answer:p...

2018-09-13 21:31:14 103

原创 WPF之DataGrid点击行展开和隐藏行细节

public partial class SourceAllocateReportView : ClientPluginBase { private SourceAllocateReportVM vm = new SourceAllocateReportVM(); public SourceAllocateReportView() { ...

2018-09-05 22:26:36 5477 2

原创 Leetcode.problem1:Two Sum

Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1]. codepublic int[] TwoSum(int[] nums, int target) { List&lt;int&gt; indexList = new L...

2018-08-10 20:00:57 94

原创 Leetcode.problem2:Add Two Numbers

Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1].   code: public ListNode AddTwoNumbers(ListNode l1, ListNode l2){ ListNode newNode = l2; ...

2018-08-10 19:47:15 117

openssl C++开发包(含debug和release,32位和64位都有)

openssl-1.0.2编译后的C艹开发包,debug、release版本都有,支持32位和64位机器配置,下载即可使用,再也不用麻烦自己去编译了。

2020-09-27

TSPTest.rar

动态规划求TSP问题最优解,工程代码以C++实现。config.ini文件用来输入点的信息,可以求出从p0出发经过所有点的最短路径,能输出最短路径长度和各点经过顺序。

2020-05-13

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

TA关注的人

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