Sitemap

A list of all the posts and pages found on the site. For you robots out there, there is an XML version available for digesting as well.

Pages

Posts

Binary Search

3 minute read

Published:

While we discuss an algorithm problem, we focus on time and space complexity. O(n), linear time, is a good enough solution. There are a few methods that can beat linear time. However, binary search is one of the O(logN) solutions. The timing that we can use the binary search is whether we discover some kind of monotonicity. Usually, a sorted structure problem is a fine candidate.

Python - Map, Filter, Reduce

4 minute read

Published:

There are three functions I frequently use in Python - map, filter, and reduce. They make complicated code simple, clear, and readable. With these powerful tools, we can reduce the repeated block that we need to apply to the array every time. The for loop and temporary variables are replaced.

Python - Scope (nonlocal, global)

3 minute read

Published:

Python does not need to declare variables. However, when we assign a value to a variable. It would decide its scope, the valid zone where you can see the variable. Python searches a variable from inside to outside.

Python - Yield

1 minute read

Published:

yield is a special keyword like return. It can create an iterator in Python. If you want to get a value from an iterator, you need to use the next function or a for loop. Sometimes, we find that the list index can’t be used directly, map and filter output. It might mean that the output is an iterator yet to be called in the normal way.

portfolio

publications

talks

teaching

Teaching experience 1

Undergraduate course, University 1, Department, 2014

This is a description of a teaching experience. You can use markdown like any other post.

Teaching experience 2

Workshop, University 1, Department, 2015

This is a description of a teaching experience. You can use markdown like any other post.