Giter Site home page Giter Site logo

codingtestgo2's Issues

(1) インターフェイス `Stackable` の定義

問題1

string 型のデータを格納するクラス Stack を実現するための interface である Stackable を定義してください。ただし、 Stack は以下の条件を満たすものとします。

  • 条件1:LIFO
  • 条件2:Push メソッドで任意の値を追加できること
  • 条件3:Pop メソッドで最後に追加した要素を削除し、その値をreturnすること

参考

スタックは要素の挿入と削除がリストの先頭だけで行われるLIFOのデータ構造です。
LIFO(Last In, First Out) とは「最後に入ったものが最初に出てゆく」という意味です。
積み重なった本をイメージするとわかりやすいです。最初に置かれたものは底にあって、
最後に置かれたものは最上に位置します。最初に置かれたものを取り出すには最後に置かれたものを順番に取り出していかなければなりません。
スタックでは要素を挿入する(積む)操作を push 、要素を削除する(取り出す)操作を pop と言います。またリストの先頭(頂上)を top 、終端(底)を bottom と呼びます。

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.