22 lines
377 B
Markdown
22 lines
377 B
Markdown
---
|
|
title: 스택(Stack)
|
|
description: 자료구조 스택
|
|
published: true
|
|
date: 2020-09-22T07:26:15.886Z
|
|
tags: 컴퓨터
|
|
editor: markdown
|
|
dateCreated: 2020-09-22T07:12:51.265Z
|
|
---
|
|
|
|
# 스택(Stack)
|
|
|
|
LIFO(Last in first out)
|
|
|
|
```rust
|
|
trait Stack<T>{
|
|
fn push(&mut self,item :T) -> Result<()>;
|
|
fn pop(&mut self) -> Result<T>;
|
|
fn is_empty() -> bool;
|
|
fn size() -> usize;
|
|
}
|
|
``` |