Tag: golang

Leetcode Problem 32: Trapping Rain Water in go

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. Example: Input: [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6… Read more »

Rearrange linked list into an alternating high – low values

Daily Coding Problem: Problem #256 [Medium] Given a linked list, rearrange the node values such that they appear in alternating low -> high -> low -> high … form. For example, given 1 -> 2… Read more »