vvlnote.github.io


Magic Square 3x3

While I was practicing my coding with HackerRank, I encounter a JavaScript coding problem, it is Forming a Magic Square. In the post, I will focus on the 3x3 Magic Square. This is the constrain of this coding problem.


Set up pgAdmin 4 to connect PostgreSQL server, and view data via pgAdmin 4

In my previous post Ruby on Rail API works with PostgreSQL Database - Part I via Homebrew, I am able to view the data in PostgreSQL via CLI. In this post, I would like to explore the data via GUI.


Ruby on Rail API works with PostgreSQL Database - Part I via Homebrew

My original Ruby on Rail backend app connecting to default database sqlite3, however, the app encountered concurrency issues, if I update several data records at about 3 seconds appart, the database would be locked up, and the app will suffer data lost, and cause the database in incorrect stage.


Basic implemention of Queue and Stack in Javascript

In the linear data structure, there are 4 ways of implmentations:

  • Array: this is a random access data structure, where each elemement inside this array can be accessed directly and in O(1) time.
  • Linked List: this is a sequencial access data structure, where each element can be access only in particular order, i.e. strting from head of the linked list.
  • Queue structure: is a container of objects that are inserted and removed an object according to first-in first-out (aka FIFO) principle.
  • Stack Structure: is a container of objexts that are inserted and removed an object accoring to last-in first-out (aka LIFO) principle.

Basic Traversal implementation of Binary Tree in Javascript

In this post, I would like to demonstrate about the basic traveral implement of a binary tree. The followings are the topics that I would like to covert in the post.