Category "abstract-data-type"

Singly-linked set computational complexity

If you optimally implemented a Set using a singly-linked list structure, what would the computational complexity (big-O) be for the intersection operation?

Java interface loose coupling advantages in realworld?

Can someone help me out, I read some Java tight and loose coupling article. I had certain doubts in loose coupling watched several YouTube videos and articles,

Writing Algebraic Data Type in Scala

In Haskell, I can define a Tree: data Tree a = Empty | Node a (Tree a) (Tree a) How could I write this in Scala? I'm not sure how to keep the type paramete