Skip to content

四号程序员

Keep It Simple and Stupid

  • Home
  • 读过的书
  • 从0到1实战微服务架构(第2版)

链表的就地反转 c语言实现

Leave a reply

#include
typedef struct node
{
int num;
struct node *next;
}*LINK,NODE;
LINK link_rev(LINK head);
LINK link_cr(int num);
void link_show(LINK head);

int main()
{
LINK *p,head,head1;
head=link_cr(5);
printf("Now create 5 NODE LINK,print:");[......]

继续阅读

This entry was posted in 算法&数据结构 and tagged 反转, 递归, 链表 on 2009-11-26 by coder4.

俄式乘法 c语言实现

Leave a reply

#include
long muti(long n,long m);
int main()
{
printf("%ld",muti(1000,1000));

return 0;

}

long muti(long n,long m)
{
if(n==1) return m;
else
{
if(n%2==0)
{
return muti(n>>1,m1,m1,m[......]

继续阅读

This entry was posted in 算法&数据结构 and tagged c语言, 俄式乘法, 递归 on 2009-11-26 by coder4.

棋盘覆盖问题

Leave a reply

/* 标准文档模板 */

#include "Stdio.h"
#include "Conio.h"
#define N 16

void Chess(int tr,int tc,int dr,int dc,int size);
void Show();

int board[N+1][N+1];
int main()
{
/* 此处添加你自己的代码 */
board[1][1]=-1;
Chess(1,1,1,1,N);
Show();

getch();
retu[......]

继续阅读

This entry was posted in 算法&数据结构 and tagged c语言, 棋盘覆盖, 算法, 递归 on 2009-11-26 by coder4.

单链表的创建、插入、删除、查找

Leave a reply

#include

typedef struct phone
{
long num;
char name[20];
struct phone *next;
} PHONE,*LINK;

LINK crate(int num);
void print(LINK head);
LINK insert(int pos,long num,char *name,LINK head);
LINK del(int pos,LINK head);
void find(long num,LINK[......]

继续阅读

This entry was posted in 算法&数据结构 and tagged 创建, 删除, 插入, 查找, 链表 on 2009-11-26 by coder4.

二分法求根--c语言描述

Leave a reply

二分法求根--c语言描述

#include
#include

double f(double x);
//求根主函数 x1 x2为求根区间!
void root(double x1,double x2);

int main()
{

root(0,20);

return 0;

}

double f(double x)
{
return exp(x)-2;
}

void root(double x1,double x2)
{
double x;
int flag=[......]

继续阅读

This entry was posted in 算法&数据结构 and tagged c语言, 二分法, 方程求根 on 2009-11-26 by coder4.

Post navigation

← Older posts
Newer posts →

Categories

  • Android
  • C && C++
  • Go
  • iOS
  • Java
  • Linux
  • Mac
  • NLP
  • opencv
  • Perl
  • PHP
  • Python
  • RPC
  • Ruby
  • Visual C++ && C#
  • Windows
  • Wordpress
  • 前端技术
  • 大数据技术
  • 心情随笔
  • 搜索技术
  • 数据库技术
  • 未分类
  • 机器学习
  • 笔面题
  • 算法&数据结构
  • 网络&网络模拟
  • 计算机技术
  • 设计

Tags

  • Android
  • C
  • CentOS
  • c语言
  • Debian
  • docker
  • go
  • gtk
  • Hadoop
  • Hive
  • ios
  • Java && J2EE
  • Java && J2EE
  • Java核心技术
  • KVM
  • Linux
  • MySQL
  • nginx
  • Oracle
  • PHP
  • Python
  • Python Essential Reference
  • shell
  • socket
  • Ubuntu
  • VC
  • windows
  • 严蔚敏
  • 中文
  • 乱码
  • 卷2
  • 字符串
  • 安装
  • 实现
  • 排序
  • 教程
  • 数据结构
  • 核心技术
  • 算法
  • 算法技术手册
  • 编译
  • 读书笔记
  • 递归
  • 配置
  • 重读
Proudly powered by WordPress