stack 0.1.0 copy "stack: ^0.1.0" to clipboard
stack: ^0.1.0 copied to clipboard

outdated

A package for stack data structure. have the push, pop and top functionalities.

example/main.dart

import 'package:stack/stack.dart';

void main() {
  Stack<String> stack = Stack<String>();
  stack.push('abc');
  stack.push('edf');
  print(stack.pop()); // prints 'edf'
  print(stack.top()); // prints 'abc'
  for (var i = 0; i < 10; i++) {
    stack.push(i.toString());
  }
  while (stack.isNotEmpty) {
    stack.pop();
  }
  print(stack.isEmpty); // prints true
}
35
likes
0
pub points
91%
popularity

Publisher

unverified uploader

A package for stack data structure. have the push, pop and top functionalities.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on stack