Open in app
Home
Notifications
Lists
Stories

Write
Gulgina Arkin
Gulgina Arkin

Home
About

Published in JavaScript in Plain English

·Nov 20, 2020

JavaScript Algorithm: How to Reverse Linked List

Prerequisite: Singly Linked List in JavaScript 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?

Java Script

2 min read

JavaScript Algorithm: How to Reverse Linked List
JavaScript Algorithm: How to Reverse Linked List

Published in JavaScript in Plain English

·Nov 13, 2020

JavaScript Algorithm: How to Square a Sorted Array

Problem 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] Note: 1 <= A.length <= 10000 -10000 <= A[i] <= 10000 A is sorted…

Java Script

2 min read

JavaScript Algorithm: How to Square a Sorted Array
JavaScript Algorithm: How to Square a Sorted Array

JavaScript Algorithm: How to Square a Sorted Array

Photo by Hello I'm Nik 🎞 on Unsplash

Problem

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]

Note:

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

--

--


Published in JavaScript in Plain English

·Nov 6, 2020

JavaScript Algorithm: How to Find the Town Judge

Problem 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…

Javascrip

3 min read

JavaScript Algorithm: How to Find the Town Judge
JavaScript Algorithm: How to Find the Town Judge

Published in JavaScript in Plain English

·Oct 28, 2020

How To Merge Two Binary Trees In JavaScript🌳

Prerequisite: Tree Traversal In JavaScript Problem 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…

Java Script

2 min read

How To Merge Two Binary Trees In JavaScript
How To Merge Two Binary Trees In JavaScript

Published in JavaScript in Plain English

·Oct 23, 2020

JavaScript Solution to Minimum Depth of Binary Tree

Prerequisite: Tree Traversal In JavaScript 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. It can be challenging at first, with the help of depth first search and breadth first search we can solve…

Java Script

3 min read

JavaScript Solution to Minimum Depth of Binary Tree
JavaScript Solution to Minimum Depth of Binary Tree

Oct 15, 2020

Networking with Redux-Saga

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…

Redux Saga

3 min read


Published in JavaScript in Plain English

·Oct 9, 2020

JavaScript Solution to Maximum Depth of N-ary Tree

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. Problem: Given a n-ary…

Java Script

2 min read

JavaScript Solution to Maximum Depth of N-array Tree
JavaScript Solution to Maximum Depth of N-array Tree

Published in Weekly Webtips

·Oct 2, 2020

JavaScript Solution of Trapping Rain Water

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. To make sure I understand the approach…

Java Script

3 min read

JavaScript Solution of Trapping Rain Water
JavaScript Solution of Trapping Rain Water

Published in JavaScript in Plain English

·Sep 25, 2020

JavaScript Solution to Number of Recent Calls

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 Write…

Java Script

3 min read

JavaScript Solution to Number of Recent Calls
JavaScript Solution to Number of Recent Calls

Published in JavaScript in Plain English

·Sep 15, 2020

Cycle Detection of A Linked List in JavaScript

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. Given head, the head of a linked list, determine if the…

Java Script

3 min read

Cycle Detection of A Linked List in JavaScript
Cycle Detection of A Linked List in JavaScript
Gulgina Arkin

Gulgina Arkin

Multi-human-lingual and multi-programming-lingual | https://www.gaierken.com/

Following
  • Samir Jasarat

    Samir Jasarat

  • Trey Huffine

    Trey Huffine

  • Saima Rahman

    Saima Rahman

  • Alla Zarifyan

    Alla Zarifyan

  • Osgood Gunawan

    Osgood Gunawan

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable