Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgContentJComments has a deprecated constructor in /var/www/astarmathsandphysics/plugins/content/jcomments/jcomments.php on line 25 Call Stack: 0.0001 360656 1. {main}() /var/www/astarmathsandphysics/index.php:0 0.1161 1209288 2. Joomla\CMS\Application\SiteApplication->execute() /var/www/astarmathsandphysics/index.php:49 0.1161 1209288 3. Joomla\CMS\Application\SiteApplication->doExecute() /var/www/astarmathsandphysics/libraries/src/Application/CMSApplication.php:267 0.1883 4102280 4. Joomla\CMS\Application\SiteApplication->dispatch() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:233 0.1897 4129816 5. Joomla\CMS\Component\ComponentHelper::renderComponent() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:194 0.1904 4147528 6. Joomla\CMS\Component\ComponentHelper::executeComponent() /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:356 0.1904 4164536 7. require_once('/var/www/astarmathsandphysics/components/com_content/content.php') /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:381 0.1912 4172272 8. ContentController->execute() /var/www/astarmathsandphysics/components/com_content/content.php:42 0.1912 4172272 9. ContentController->display() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:710 0.2328 4400200 10. ContentController->display() /var/www/astarmathsandphysics/components/com_content/controller.php:113 0.2343 4417600 11. Joomla\CMS\Cache\Controller\ViewController->get() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:663 0.2348 4438528 12. ContentViewArticle->display() /var/www/astarmathsandphysics/libraries/src/Cache/Controller/ViewController.php:102 0.2434 4503848 13. Joomla\CMS\Plugin\PluginHelper::importPlugin() /var/www/astarmathsandphysics/components/com_content/views/article/view.html.php:189 0.2435 4504104 14. Joomla\CMS\Plugin\PluginHelper::import() /var/www/astarmathsandphysics/libraries/src/Plugin/PluginHelper.php:182 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; JCommentsACL has a deprecated constructor in /var/www/astarmathsandphysics/components/com_jcomments/classes/acl.php on line 17 Call Stack: 0.0001 360656 1. {main}() /var/www/astarmathsandphysics/index.php:0 0.1161 1209288 2. Joomla\CMS\Application\SiteApplication->execute() /var/www/astarmathsandphysics/index.php:49 0.1161 1209288 3. Joomla\CMS\Application\SiteApplication->doExecute() /var/www/astarmathsandphysics/libraries/src/Application/CMSApplication.php:267 0.1883 4102280 4. Joomla\CMS\Application\SiteApplication->dispatch() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:233 0.1897 4129816 5. Joomla\CMS\Component\ComponentHelper::renderComponent() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:194 0.1904 4147528 6. Joomla\CMS\Component\ComponentHelper::executeComponent() /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:356 0.1904 4164536 7. require_once('/var/www/astarmathsandphysics/components/com_content/content.php') /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:381 0.1912 4172272 8. ContentController->execute() /var/www/astarmathsandphysics/components/com_content/content.php:42 0.1912 4172272 9. ContentController->display() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:710 0.2328 4400200 10. ContentController->display() /var/www/astarmathsandphysics/components/com_content/controller.php:113 0.2343 4417600 11. Joomla\CMS\Cache\Controller\ViewController->get() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:663 0.2348 4438528 12. ContentViewArticle->display() /var/www/astarmathsandphysics/libraries/src/Cache/Controller/ViewController.php:102 0.3686 12293136 13. JEventDispatcher->trigger() /var/www/astarmathsandphysics/components/com_content/views/article/view.html.php:199 0.3688 12293584 14. plgContentJComments->update() /var/www/astarmathsandphysics/libraries/joomla/event/dispatcher.php:160 0.3688 12293584 15. plgContentJComments->onContentAfterDisplay() /var/www/astarmathsandphysics/libraries/joomla/event/event.php:70 0.3690 12301832 16. plgContentJComments->onAfterDisplayContent() /var/www/astarmathsandphysics/plugins/content/jcomments/jcomments.php:339 0.3693 12303568 17. JComments::show() /var/www/astarmathsandphysics/plugins/content/jcomments/jcomments.php:282 0.3699 12336616 18. JCommentsFactory::getACL() /var/www/astarmathsandphysics/components/com_jcomments/jcomments.php:188 0.3699 12337016 19. spl_autoload_call() /var/www/astarmathsandphysics/components/com_jcomments/classes/factory.php:274 0.3700 12337096 20. JLoader::load() /var/www/astarmathsandphysics/components/com_jcomments/classes/factory.php:274 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; JCommentsPagination has a deprecated constructor in /var/www/astarmathsandphysics/components/com_jcomments/helpers/pagination.php on line 18 Call Stack: 0.0001 360656 1. {main}() /var/www/astarmathsandphysics/index.php:0 0.1161 1209288 2. Joomla\CMS\Application\SiteApplication->execute() /var/www/astarmathsandphysics/index.php:49 0.1161 1209288 3. Joomla\CMS\Application\SiteApplication->doExecute() /var/www/astarmathsandphysics/libraries/src/Application/CMSApplication.php:267 0.1883 4102280 4. Joomla\CMS\Application\SiteApplication->dispatch() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:233 0.1897 4129816 5. Joomla\CMS\Component\ComponentHelper::renderComponent() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:194 0.1904 4147528 6. Joomla\CMS\Component\ComponentHelper::executeComponent() /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:356 0.1904 4164536 7. require_once('/var/www/astarmathsandphysics/components/com_content/content.php') /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:381 0.1912 4172272 8. ContentController->execute() /var/www/astarmathsandphysics/components/com_content/content.php:42 0.1912 4172272 9. ContentController->display() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:710 0.2328 4400200 10. ContentController->display() /var/www/astarmathsandphysics/components/com_content/controller.php:113 0.2343 4417600 11. Joomla\CMS\Cache\Controller\ViewController->get() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:663 0.2348 4438528 12. ContentViewArticle->display() /var/www/astarmathsandphysics/libraries/src/Cache/Controller/ViewController.php:102 0.3686 12293136 13. JEventDispatcher->trigger() /var/www/astarmathsandphysics/components/com_content/views/article/view.html.php:199 0.3688 12293584 14. plgContentJComments->update() /var/www/astarmathsandphysics/libraries/joomla/event/dispatcher.php:160 0.3688 12293584 15. plgContentJComments->onContentAfterDisplay() /var/www/astarmathsandphysics/libraries/joomla/event/event.php:70 0.3690 12301832 16. plgContentJComments->onAfterDisplayContent() /var/www/astarmathsandphysics/plugins/content/jcomments/jcomments.php:339 0.3693 12303568 17. JComments::show() /var/www/astarmathsandphysics/plugins/content/jcomments/jcomments.php:282 0.3760 12462632 18. JComments::getCommentsList() /var/www/astarmathsandphysics/components/com_jcomments/jcomments.php:270

The Interchange Sort

The interchange sort orders a list alphabetically or in order of size by picking the first in order, wherever it is in the list, and swapping that with the first element in the unsorted list, if necessary. The second in order is swapped with the second in the list, the third with the third in the list and so on. The process is repeated until the list is sorted.

For example, to sort the list

4, 2, 5, 8, 1, 7, 9

The smallest number in the list is 1 so this is swapped with the first number to give the list

1, 2, 5, 8, 4, 7, 9

The next smallest number in the list is 2 and this is second so does not need to be swapped

1, 2, 5, 8, 4, 7, 9

The next smallest number in the list is 4 so this is swapped with the third number to give the list

1, 2, 4, 8, 5, 7, 9

The next smallest number in the list is 5 so this is swapped with the fourth number to give the list

1, 2, 4, 5, 8, 7, 9

The next smallest number in the list is 7 and this is sixth so does not need to be swapped

1, 2, 5, 8, 4, 7, 9

The next smallest, and last number in the list is 9 and this is sixth so does not need to be swapped

1, 2, 5, 8, 4, 7, 9

The list is sorted

Comments   

#1 Exploit Tester 2016-12-14 15:16
alert();

Add comment

Security code
Refresh