Home > CE-242 > CE242-Spring’09-Homework#6

CE242-Spring’09-Homework#6

CE242 Data Structures and Algorithms Course @KHas – Spring 2009 – Homework #6 questions and solutions and some extra code including several different implementations of HeapSort algorithm with related test codes.
I recommend you to check these links before inspecting the code:

CE242 Data Structures and Algorithms course description is available here.

Download questions and solutions

Notes:

  • “testHeapSortT.cpp” needs “Point2D.cpp” module,
  • “testHeapSortStr.cpp” needs “HeapSortStr.cpp” module,
  • “testHeapSortInt.cpp” needs “HeapSortInt.cpp” module,
  • “testHeapSortGen.cpp” needs “HeapSortGen.cpp” module,

so link them together while building the code.

Source files:

-HeapSort for integer arrays-

[HeapSortInt.h] | show

[HeapSortInt.cpp] | show

[testHeapSortInt.cpp] | show

-HeapSort for string arrays-

[HeapSortStr.h] | show

[HeapSortStr.cpp] | show

[testHeapSortStr.cpp] | show

-HeapSort for generic types using void pointers-

[HeapSortGen.h] | show

[HeapSortGen.cpp] | show

[testHeapSortGen.cpp] | show

-HeapSort for generic types using C++ templates-

[Point2D.h] | show

[Point2D.cpp] | show

[HeapSortT.h] | show

[testHeapSortT.cpp] | show

  1. No comments yet.
  1. No trackbacks yet.