Sort Array With Squares | Algorithm Simplified | Tutorial 10

Опубликовано: 15 Апрель 2021
на канале: Studytonight with Abhishek
2,909
31

Given an array of both positive and negative integers 'arr[]' which are sorted. The task is to sort the square of the numbers of the Array.

Simple solution is to first convert each array element into its square and then apply any “O(nlogn)” sorting algorithm to sort the array elements.



Learn various programming languages on our website: https://www.studytonight.com

Find us on Instagram:   / study.tonight   (we post great videos here too)
Find us on LinkedIn:   / studytonight