HackerRank C++ Algorithms: Zig Zag Sequence solution (Debugging)

Sdílet
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...

Komentáře • 5

  • @Not0rious7
    @Not0rious7 Před 2 lety +1

    Thank you bro 🇬🇭, you deserve more likes.

  • @MaestreSan
    @MaestreSan Před 2 lety

    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?

    • @nextrie
      @nextrie  Před 2 lety +1

      Hey, not in this case. The instructions also say: "You need to find the lexicographically smallest zig zag sequence of the given array."

  • @dipeshjha3528
    @dipeshjha3528 Před 3 lety +2

    I want ur brain on rent