When given a singly linked list how can we manage to reverse it? Like the following example, if the input linked list is 1->2->3->4->5->NULL, can we reverse it into the output as 5->4->3->2->1->NULL?

Photo by Hello I'm Nik 🎞 on Unsplash


Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.

Example 1:

Input: [-4,-1,0,3,10]
Output: [0,1,9,16,100]

Example 2:

Input: [-7,-3,2,3,11]
Output: [4,9,9,49,121]


  1. 1 <= A.length <= 10000
  2. -10000 <= A[i] <= 10000
  3. A is sorted…

Photo by Tingey Injury Law Firm on Unsplash


In a town, there are N people labelled from 1 to N.  There is a rumor that one of these people is secretly the town judge.If the town judge exists, then:1. The town judge trusts nobody.
2. Everybody (except for the town judge) trusts the town judge.
3. There is…

Prerequisite: Tree Traversal In JavaScript

Photo by Alla Hetman on Unsplash


Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.You need to merge them into a new binary tree. The merge rule is…

Prerequisite: Tree Traversal In JavaScript

Photo by Greg Rosenke on Unsplash

For our last She’s coding data structure and algorithm event I chose minimum depth of binary tree problem to practice tree traversing with our participants. …

What is Redux-Saga?

Redux-Saga, like Thunk, is a redux middleware for React/Redux application. With the help of Redux-Saga, the side effect becomes easier to manage, more efficient to execute, simple to test and better at handling the failures. It has access to the full redux application state and it can…

Prerequisite: Tree Traversal In JavaScript

For our last ‘She’s coding’ data structure and algorithm practice event, we chose to solve maximum depth of N-ary tree problem(link). We had interesting discussion about approaches to solve it. In the following blog, I’ll share the common solution to this problem.

Photo by Belinda Fewings on Unsplash


Given a n-ary…

JavaScript Solution of Trapping Rain Water
Photo by Cristi Goia on Unsplash

For my last technical interview, I was asked about how to trap rainwater. (Not really 🤪). It was a hard level Leetcode problem. I found it challenging, that’s why I’d like to write a blog about it. …

Photo by Levi Jones on Unsplash

Number of Recent Calls is one of the leetcode questions that tripped us up. (As you can see how many downvotes it has.🧐) In the following blog, I’ll try to explain the problem and the example line by line to make it easier to understand.

Explanation of the question


Cycle detection is the algorithmic problem of finding a cycle in a sequence of iterated function values, for example, the classic linked list loop detection problem. There are different solution. For the following Leetcode example, I’ll explain true solutions.

Example of Floyd’s algorithm

Given head, the head of a linked list, determine if the…

Gulgina Arkin

Multi-human-lingual and multi-programming-lingual |

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store