2017年12月3日

摘要: 1. 个人倾向于小函数,抽象跟接口保持一致,即使入门级程序员 函数命名存在很多问题,我依旧强调功能封装 因为只要是在写代码,当时的逻辑肯定是清晰的,否则不可能写出正确的程序,这样即使 函数/类 命名存在问题, 根据当时的思路提供良好的封装,也给后续的开发人员提供了清晰的思路指导 在第一次编代码的情况 阅读全文
posted @ 2017-12-03 22:01 winters1992x 阅读(90) 评论(0) 推荐(0) 编辑

2015年7月19日

摘要: Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a... 阅读全文
posted @ 2015-07-19 18:45 winters1992x 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 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.Fo... 阅读全文
posted @ 2015-07-19 18:37 winters1992x 阅读(86) 评论(0) 推荐(0) 编辑

2015年7月17日

摘要: 广度优先算法的思想是对所有的Node进行遍历 然后将第一个Node入队列 设置其visited为真 然后 对第一个Node跟其它剩余的Node进行遍历对比 找出连通的Node 并将其visited属性赋值为真然后将其入队列 接下来对队列里面的Node进行迭代处理 最终完全遍历所有节点 阅读全文
posted @ 2015-07-17 21:17 winters1992x 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 对于无向图来说DFS深度搜索 递归思想//深度优先搜索DFS的一般实现void DFS(MGraph G,int i)//DFS递归思想{ int j; visited[i]=TRUE;//设置Node已经被访问 printf("%c",G.vexs[i]); for(j=0... 阅读全文
posted @ 2015-07-17 20:45 winters1992x 阅读(465) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"#include "stdlib.h"#define MAXVEX 10typedef char VertexType;typedef int EdgeType;typedef struct EdgeNode{ int adjvex; EdgeType... 阅读全文
posted @ 2015-07-17 19:10 winters1992x 阅读(198) 评论(0) 推荐(0) 编辑

2015年7月16日

摘要: #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */#define MAX 12//lintcode water area quest... 阅读全文
posted @ 2015-07-16 18:40 winters1992x 阅读(340) 评论(0) 推荐(0) 编辑

导航