# Category: Coding

We are given a linked list with head as the first node.  Let’s number the nodes in the list: node_1, node_2, node_3, ... etc. Each node may have a next larger value: for node_i, next_larger(node_i) is the node_j.val such that j > i, node_j.val…

#### LeetCode – Arrays – Count Number of Teams

There are n soldiers standing in a line. Each soldier is assigned a unique rating value. You have to form a team of 3 soldiers amongst them under the following rules: Return the number of teams…

#### LeetCode – Arrays – Cells with Odd Values in a Matrix

Given n and m which are the dimensions of a matrix initialized by zeros and given an array indices where indices[i] = [ri, ci]. For each pair of [ri, ci] you have to increment all cells in row ri and column ci by…

We are given head, the head node of a linked list containing unique integer values. We are also given the list G, a subset of the values in the linked list. Return the number…

#### LeetCode – LinkedList – Convert Binary Number in a Linked List to Integer

Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the binary representation of…

#### LeetCode – Arrays – Create Target Array in the Given Order

Given two arrays of integers nums and index. Your task is to create target array under the following rules: Return the target array. It is guaranteed that the insertion operations will be valid. Example 1: Input: nums…