Skip to content
A basic low level character editor class built on three abstractions for comparison.
C++ C
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
editorBuffer.app/Contents
editorBuffer.xcodeproj
utility
Buffer.h
BufferList.cpp
BufferStack.cpp
BufferVector.cpp
Info.plist
README
main.cpp

README

This program implements a simple low level editor buffer abstraction.
   There are 3 implementations that the buffer is layered on top of"
    Vector, Singly Linked List and Stack.
 
 Big-O Implementation Comparisons
 
                        Vector  Stack   List
 Buffer()               O(1)    O(1)    O(1)
 ~Buffer()              O(1)    O(1)    O(N)
 moveCursorForward()    O(1)    O(1)    O(1)
 moveCursorBackward()   O(1)    O(1)    O(N)
 moveCursorToStart()    O(1)    O(N)    O(1)
 moveCursorToEnd()      O(1)    O(N)    O(N)
 insertCharacter()      O(N)    O(1)    O(1)
 deleteCharacter()      O(N)    O(1)    O(1)
 moveCursorToWordBegin  O(1)    O(1)    O(N)
 Space used             1N      2N      5N 
 
 Stack is easiest to implement and debug.
Something went wrong with that request. Please try again.