Fresh Beginning
  • Home
  • Speaking
  • Reading
  • Github
  • Alma Mater
  • Contact
Subscribe
Tagged

Sorting

A collection of 2 posts

Dutch National Flag / 3 Way partition problem
Interview

Dutch National Flag / 3 Way partition problem

Recently while going through interview questions, I came across this interesting problem - Called 3-way partitioning or also called as a Dutch National flag problem. In gist, the problem is given an array containing 3 distinct elements, (Say 0, 1 and 2) sort them in the increasing order. When you

  • Jayesh Kawli
Jayesh Kawli Jul 12, 2017 • 3 min read
Swift 3.0

Equality and Comparison with custom objects in Swift (Equatable protocol)

Few weeks ago I ran into frustrating problem. I was dealing with custom objects in Swift. (Actually struct with properties). They were being stored in an array. Now, this array was going to undergo frequent activity due to user action such as adding new elements and avoiding duplicates. So while

  • Jayesh Kawli
Jayesh Kawli Feb 10, 2017 • 2 min read
Fresh Beginning © 2022
Powered by Ghost