package
0.0.0-20250206101203-bd6683890685
Repository: https://github.com/dockerian/go-coding.git
Documentation: pkg.go.dev

# README

# Functions

CheckExpression checks if an expression has proper openings and closings of e.g.
CheckMatchedPair determines if a given pair, e.g.
Find2ndLargest returns the second largest in an array.
FindAjacent1s returns all coordinates "x,y" of adjacent 1s, where the position has adjacent 1s horizontally or vertically, from a matrix contains only 0s and 1s.
FindAvailableSpot returns first available spot from an array of occupied parking spot numbers in a parking garage which has parking spots 0..N (N could be infinite) note: in a design for real parking garage, a) the available spots should be thread-safe to support concurrency b) or to update first available info at any time before assigned.
FindDuplicate looks up for one duplicated number in an integer array contains n numbers ranging from 0 to n-2.
FindDuplicates returns a set of duplicated numbers in an integer array contains n numbers ranging from 0 to n-1.
FindMatchedSum returns index in input array of two items match to the sum.
FindMedian func Find the median (the middle value in an ordered integer list).
GetAllCases returns all variations of upper and lower cases.
GetLongestSubstringLength solves the following problem: Given a string, find the longest non-repeating substring length.
GetLongestSubstringUTF8 solves the following problem: Given a string, find the longest substring without repeating characters.
GetLongestUniqueSubstring solves the following problem: Given a string, find the longest substring without repeating characters.
GetMostFrequentRune returns the rune and count of the most appearance.
NewBasicRegex returns a pointer to a new BasicRegex object.
NewEval return a new instance of Eval struct.
PlaceQueens func Place N queens on NxN chessboard so that no two of them attack each other See https://developers.google.com/optimization/puzzles/queens.
Readlink normalizes a path string to remove extra '.' and '..'.
SumMaxtrixDiagonal returns both diagonal sum of up-left to down-right and up-right to down-left.
Translate returns Enlish words of a number.

# Structs

BasicRegex struct.
Eval struct is a string stack implementation.

# Type aliases

Queens type.