Packages

  • package root
    Definition Classes
    root
  • package leetcode

    This project was created with a few purposes

    Leetcode Solutions in Scala

    This project was created with a few purposes

    First it is to promote language Scala and its functional approach to solve problems, Scala is expressive, succinct meanwhile far too much underrated. Second let's just admit one cannot judge the engineering calibers of another in one hour technical interview, I personally have had and failed a few and I want to do something to alleviate this madness of the industry. Use Search above and type in some method names to get the point ...

    The listed solutions are by no means complete or optimal, if you would agree the causes, and feel like to contribute solutions, fixes or scaladocs to better illustrate everything, all PRs are welcome !

    To maintain its goal please take a few notes too,

    • Respect Scala CoC.
    • Solutions shall pass all of their tests in leetcode, using plain Scala and its std library only.
    • Solutions need to bundle their own unit tests, this project uses uTest.
    • Always prefer functional programming, which requires immutable data, pure functions etc, and keep it to the point.
    • Always prefer a generic solution, which captures the gist of a pattern or an algorithm, even if it implies some tradeoffs and becomes slightly suboptimal in terms of computational or space efficiency.
    • Try to achieve performance only after doing it right, iterate above notes for clarification, although this might defeat the original leetcode intention, one might be surprised that functional programming can be performant too.
    • Extra boilerplates are needed in package object so that Scaladoc can better serve us.
    • Last not the least, use Scalafmt
    Definition Classes
    root
  • package p15

    3Sum

    Definition Classes
    leetcode
    See also

    leetcode

    Two Sum

    3Sum Closest

    4Sum

    3Sum Smaller

  • Solution1
  • Three_Sum
t

leetcode.p15

Three_Sum

trait Three_Sum extends Medium with Facebook with Amazon with Google with Adobe with Apple with Bloomberg with Microsoft with Uber with Alibaba with Baidu with TopicArray with TopicTwoPointers

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Three_Sum
  2. TopicTwoPointers
  3. TopicArray
  4. Baidu
  5. Alibaba
  6. Uber
  7. Microsoft
  8. Bloomberg
  9. Apple
  10. Adobe
  11. Google
  12. Amazon
  13. Facebook
  14. Medium
  15. AnyRef
  16. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from TopicTwoPointers

Inherited from TopicArray

Inherited from Baidu

Inherited from Alibaba

Inherited from Uber

Inherited from Microsoft

Inherited from Bloomberg

Inherited from Apple

Inherited from Adobe

Inherited from Google

Inherited from Amazon

Inherited from Facebook

Inherited from Medium

Inherited from AnyRef

Inherited from Any

Ungrouped