Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Scala crud app using http4s, circe and in-memory-db (thread safe concurrent TrieMap). Stack safe recursion

Notifications You must be signed in to change notification settings

aditya-K93/transactions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

  • Install sbt (Scala Build Tool)
  • Compile sbt clean compile
  • Test sbt test
  • Run sbt run

Transitive Sum (recursive definition)

parent(C) = A
parent(D) = B
parent(B) = C
for any given txn x: transitive_sum(x)   => f(x) + transitive_sum(children(x)) where f(x) is cost of txn x
transitive_sum(A)    = f(A) + transitive_sum(C)
transitive_sum(B)    = f(B) + transitive_sum(D)
transitive_sum(C)    = f(C) + transitive_sum(B)
transitive_sum(D)    = f(D)

transitive_sum(B)    = f(B) + transitive_sum(D)
                     = f(B) + f(D)
transitive_sum(C)    = f(C) + transitive_sum(B)
                     = f(C) + f(B) + f(D)
transitive_sum(A)    = f(A) + transitive_sum(C)                    
                     = f(A) + f(C) + f(B) + f(D)

Example commands (GET, POST, PUT):

About

Scala crud app using http4s, circe and in-memory-db (thread safe concurrent TrieMap). Stack safe recursion

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages