HackerRank C++ Algorithms: Zig Zag Sequence solution (Debugging)
Vložit
- čas přidán 30. 05. 2020
- HackerRank C++ solution for the Algorithms Debugging coding challenge called Zig Zag Sequence. In this coding question, we have to debug a function that reorders integers in an array, to sort the first half of the array in increasing order, and then the second half of the array in descending order. By understanding how indices and iterations work with arrays, we can debug the function to make the C++ program output what we expect.
All HackerRank solutions on GitHub (please leave a star): github.com/IsaacAsante/Hacker...
HackerRank's Zig Zag Sequence coding challenge: www.hackerrank.com/challenges...
Thank you bro 🇬🇭, you deserve more likes.
In the text example "Now if we permute the array as [1,4,5,3,2] ..." I think the output should be [1,2,5,4,3], right?
Hey, not in this case. The instructions also say: "You need to find the lexicographically smallest zig zag sequence of the given array."
I want ur brain on rent
hahaha