数据结构基础(C语言版)习题英文版答案(可编辑).docx

数据结构基础(C语言版)习题英文版答案(可编辑).docx

  1. 1、本文档共168页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数据结构基础(C语言版)习题英文版答案(可编辑).docx

本人答案整理自/~sahni/fdsc2ed//~sahni/fdsc2ed/没有进行校对,仅为方便自己断网或网络不好时使用.如有纰漏,望请见谅.因见多有人寻此资源不果,遂分享之,以报多年来众驴友分享于我之万一.本答案为 英文版 数据结构基础(C语言版) 即 FUNDAMENTALS OF DATA STRUCTURES IN C 部分习题答案.答案所有文字描述均为英文.且仅有大部分习题答案.少数习题答案网站没有给出,因而我也没有办法.本人排版水平不佳,全部复制粘贴网站内容,几乎未经过任何排版,大家就将就看下吧.目录CHAPTER 12CHAPTER 224CHAPTER 344CHAPTER 463CHAPTER 579CHAPTER 696CHAPTER 7125CHAPTER 8139CHAPTER 9140CHAPTER 10142CHAPTER 11147CHAPTER 12170CHAPTER 1Chapter 1, Pages 16-17Problem 1.a This statement is a poorly phrased version of Fermats last theorem. We know that we can find n 2 for which ?the equation holds. Fermat scribbled a note on a text margin indicating that he had found the solution for n = 2. Unfortunately, the proof died with him. Because the statement is phrased as a question? rather than a clearly defined algorithm, it lacks definiteness.Problem 1.b This statement violates not only the rules of mathematics, but the criterion of effectiveness. We can compute only those things that are feasible, and division by zero is mathematically undefinedPage 17, Exercise 3#include stdio.h#include math.h#include string.h#define TRUE 1#define FALSE 0#define MAX_STRING 100void truth_table(int);int main(){ int n; printf(n:(=0): ); scanf(%d, n); while (n = 0) { /*error loop */ printf(n:(=0): ); scanf(%d, n); } truth_table(n);}void truth_table(int n){/* generate a truth_table by transforming # of permutations into binary */int i,j, div, rem;char string[MAX_STRING];for (i=0; i pow(2,n); i++){/*number of permutations or rows in the table */ strcpy(string ,\0); div = i; for (j = n; j 0; j--) {/*number of bits needed for each row*/ rem = div%2; div = div/2; if (!rem) strcat(string,FALSE ); else strcat(string, TRUE ); } printf(%s\n, string); } } Page 17, Exercise 4#include stdio.hint min(int, int);#define TRUE 1#define FALSE 0int main(){ int x,y,z; printf(x: ); scanf(%d, x); printf(y: ); scanf (%d, y); printf(z: ); scanf(%d, z); if (min(x,y) min(y,z)) {/*x is smallest */ printf(%d , x); if (min(y,z)) printf (%d

文档评论(0)

zhangningclb + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档