Sorting – Set 3

Sorting Set 1  Sorting Set 2 [Merge Sort] Sort array after converting elements to their squares Given a array of both positive and negative integers ‘arr[]’ which are sorted. Task is to sort square of the numbers of the Array. GFG Algo: 1. Since half of the array is positive and negative, when we square each… Continue reading Sorting – Set 3



Big O CheatSheet  *** - used in questions like this - - Problem set on sorting Topological Sort / Topological Graph - In a tennis tournament of N players every player plays with every other player. The following condition always hold - If player P1 has won the match with P2 and player P2 has won from… Continue reading Sorting