How to scramble a string of text?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Input = "abcdef" And Output = "fdbace"



Steps: "bacdef", "cabdef", "dbacef", "ecabdf", "fdbace"










share|improve this question

















  • 2




    What, precisely, is the question?
    – bbgodfrey
    2 hours ago










  • Reverse the first two letter of the string "abcdef" which will give "bacdef". Then take this as the new string and reverse the first 3 letter. Similarly, proceed for all the characters of the string.
    – Bignya ranjan Pathi
    2 hours ago










  • Please edit the comment into the question.
    – corey979
    1 hour ago






  • 4




    OK, I gotta say this: are you seriously asking this place to solve Pancake Scramble? To submit other people's solutions?
    – J. M. is somewhat okay.♦
    1 hour ago














up vote
1
down vote

favorite












Input = "abcdef" And Output = "fdbace"



Steps: "bacdef", "cabdef", "dbacef", "ecabdf", "fdbace"










share|improve this question

















  • 2




    What, precisely, is the question?
    – bbgodfrey
    2 hours ago










  • Reverse the first two letter of the string "abcdef" which will give "bacdef". Then take this as the new string and reverse the first 3 letter. Similarly, proceed for all the characters of the string.
    – Bignya ranjan Pathi
    2 hours ago










  • Please edit the comment into the question.
    – corey979
    1 hour ago






  • 4




    OK, I gotta say this: are you seriously asking this place to solve Pancake Scramble? To submit other people's solutions?
    – J. M. is somewhat okay.♦
    1 hour ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Input = "abcdef" And Output = "fdbace"



Steps: "bacdef", "cabdef", "dbacef", "ecabdf", "fdbace"










share|improve this question













Input = "abcdef" And Output = "fdbace"



Steps: "bacdef", "cabdef", "dbacef", "ecabdf", "fdbace"







string-manipulation






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 hours ago









Bignya ranjan Pathi

745




745







  • 2




    What, precisely, is the question?
    – bbgodfrey
    2 hours ago










  • Reverse the first two letter of the string "abcdef" which will give "bacdef". Then take this as the new string and reverse the first 3 letter. Similarly, proceed for all the characters of the string.
    – Bignya ranjan Pathi
    2 hours ago










  • Please edit the comment into the question.
    – corey979
    1 hour ago






  • 4




    OK, I gotta say this: are you seriously asking this place to solve Pancake Scramble? To submit other people's solutions?
    – J. M. is somewhat okay.♦
    1 hour ago












  • 2




    What, precisely, is the question?
    – bbgodfrey
    2 hours ago










  • Reverse the first two letter of the string "abcdef" which will give "bacdef". Then take this as the new string and reverse the first 3 letter. Similarly, proceed for all the characters of the string.
    – Bignya ranjan Pathi
    2 hours ago










  • Please edit the comment into the question.
    – corey979
    1 hour ago






  • 4




    OK, I gotta say this: are you seriously asking this place to solve Pancake Scramble? To submit other people's solutions?
    – J. M. is somewhat okay.♦
    1 hour ago







2




2




What, precisely, is the question?
– bbgodfrey
2 hours ago




What, precisely, is the question?
– bbgodfrey
2 hours ago












Reverse the first two letter of the string "abcdef" which will give "bacdef". Then take this as the new string and reverse the first 3 letter. Similarly, proceed for all the characters of the string.
– Bignya ranjan Pathi
2 hours ago




Reverse the first two letter of the string "abcdef" which will give "bacdef". Then take this as the new string and reverse the first 3 letter. Similarly, proceed for all the characters of the string.
– Bignya ranjan Pathi
2 hours ago












Please edit the comment into the question.
– corey979
1 hour ago




Please edit the comment into the question.
– corey979
1 hour ago




4




4




OK, I gotta say this: are you seriously asking this place to solve Pancake Scramble? To submit other people's solutions?
– J. M. is somewhat okay.♦
1 hour ago




OK, I gotta say this: are you seriously asking this place to solve Pancake Scramble? To submit other people's solutions?
– J. M. is somewhat okay.♦
1 hour ago










1 Answer
1






active

oldest

votes

















up vote
4
down vote



accepted










FoldList[
StringJoin[StringReverse[StringTake[#1, 1, #2]], StringTake[#1, #2 + 1 ;;]] &,
"abcdef",
Range[2, 6]
]



"abcdef", "bacdef", "cabdef", "dbacef", "ecabdf", "fdbace"







share|improve this answer




















    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "387"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182894%2fhow-to-scramble-a-string-of-text%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    4
    down vote



    accepted










    FoldList[
    StringJoin[StringReverse[StringTake[#1, 1, #2]], StringTake[#1, #2 + 1 ;;]] &,
    "abcdef",
    Range[2, 6]
    ]



    "abcdef", "bacdef", "cabdef", "dbacef", "ecabdf", "fdbace"







    share|improve this answer
























      up vote
      4
      down vote



      accepted










      FoldList[
      StringJoin[StringReverse[StringTake[#1, 1, #2]], StringTake[#1, #2 + 1 ;;]] &,
      "abcdef",
      Range[2, 6]
      ]



      "abcdef", "bacdef", "cabdef", "dbacef", "ecabdf", "fdbace"







      share|improve this answer






















        up vote
        4
        down vote



        accepted







        up vote
        4
        down vote



        accepted






        FoldList[
        StringJoin[StringReverse[StringTake[#1, 1, #2]], StringTake[#1, #2 + 1 ;;]] &,
        "abcdef",
        Range[2, 6]
        ]



        "abcdef", "bacdef", "cabdef", "dbacef", "ecabdf", "fdbace"







        share|improve this answer












        FoldList[
        StringJoin[StringReverse[StringTake[#1, 1, #2]], StringTake[#1, #2 + 1 ;;]] &,
        "abcdef",
        Range[2, 6]
        ]



        "abcdef", "bacdef", "cabdef", "dbacef", "ecabdf", "fdbace"








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 hours ago









        Henrik Schumacher

        40.2k255120




        40.2k255120



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182894%2fhow-to-scramble-a-string-of-text%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            Long meetings (6-7 hours a day): Being “babysat” by supervisor

            Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

            Confectionery