Giter Club home page Giter Club logo

push_swap's Introduction

Push Swap, argüman olarak integer değer aralığında sayılar alıp bunları mümkün olan en az adımda sıralamayı amaçlayan bir projedir. Bu sıralama işlemi için argüman olarak alınan sayıları bir stack(Stack A) olarak tutar ve bu stackten ayrı olarak yardımcı bir stack(Stack B) kullanır. Stack’lerde bulunan sayıların sırasını değiştirmek için yalnızca, pek çok programlama dilinde mevcut olan bir dizi operasyonel hamleden faydalanır. Bunlar; SA(A’daki ilk iki elemanın yerini değiştirir), SB(A’daki ilk iki elemanın yerini değiştirir), SS(SA ve SB aynı anda uygular), PA(A’dan B’ye ilk elemanı pushlar), PB(B’den A’ya ilk elemanı pushlar), RA(A’daki bütün elemanları bir yukarı kaydırır), RB(B’deki bütün elemanları bir yukarı kaydırır), RR(RA ve RB aynı anda uygular), RRA(A’daki elemanları bir aşağı kaydırır), RRB(B’deki elemanları bir aşağı kaydırır), RRR(RRA ve RRB aynı anda uygular). Bu hamlelerin uygun olanlarını sayılar sıralı, stack A da bulunacak şekilde uygular ve hamleleri standart output’a yazar.

push_swap's People

Contributors

ucylmz avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.