InfluxDB empowers developers to build IoT, analytics and monitoring software. It is purpose-built to handle the massive volumes and countless sources of time-stamped data produced by sensors, applications and infrastructure.

Install GVM

bash < <(curl -s -S -L

Select the appropriate GO version

gvm install go1.13 
go version

Prepare the source directory

mkdir $HOME/gocodez 
export GOPATH=$HOME/gocodez

Get the InfluxDB codes

go get 
cd $GOPATH/src/
git checkout v1.8.9

Build the InfluxDB codes

go install -ldflags="-X main.version=1.8.9 -X main.branch=main -X main.commit=d9b56321d5796d7791138ed6a8f0a6ae6007a551" ./...

Originally published at

In computer science, a linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until a match is found or the whole list has been searched.


  • A linear search runs in at worst linear time and makes at most n comparisons, where n is the length of the list.

Time complexity

Worst-case performance: O(n)
Best-case performance: O(1)
Average performance: O(n)
Worst-case space complexity: O(1) iterative


final class LinearSearch {

static int search(final int[] in, final int value) {
for (var i = 0; i < in.length; i++) {
if (in[i] == value) {
return i;

return -1;


Source Code

Andrey Karazhev

Software Engineer

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