带有链表和随机数据集的快速排序 [英] quicksort with linked list and random pivot

查看:98
本文介绍了带有链表和随机数据集的快速排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该编写一个使用链表和随机数据元素实现快速排序的程序。我是一个相当新的编程,我已经尝试编写程序,它编译但不起作用,如果有人可以帮助指出它的错误,我会非常感激,这是我的代码到目前为止

展开 | 选择 | Wrap | 行号

解决方案

您是否使用调试器逐步完成了代码?


< blockquote>我以前从未使用调试器调试过,所以我真的不知道如何去做。我使用代码块来编译我的代码,我将检查它是否有内置的调试器


你的程序以什么方式不起作用?
  • 它是否失败构建?
  • 它是否会出现运行时错误?
  • 它是否给出了错误的答案?
对问题的描述越好越容易帮助你。


顺便说一下,当你到达第19行时,你认为数据的价值是什么?

im supposed to write a program that implements quicksort using linked list and random pivot element. i am fairly new to programming, i have tried writing the program, it compiles but does not work, if someone could help point out whats wrong with it, i would be very grateful, this is my code so far

Expand|Select|Wrap|Line Numbers

解决方案

Have you stepped through the code using your debugger?


i have never debugged using a debugger before, so i dont really know how to go about doing that. i use codeblocks to compile my code, i will check to see if it has a built in debugger


In what way does your program not work?
  • Does it fail to build?
  • Does it get a runtime error?
  • Does it give the wrong answer?
The better your description of the problem the easier it will be to help you.

By the way, what do you think is the value of data when you get to line 19?


这篇关于带有链表和随机数据集的快速排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆