Skip to content Skip to sidebar Skip to footer
Showing posts with the label Algorithm

Is There A Formula For Calculating Or Estimating The Number Of Digits Of A Binary Integer?

ex : base 10(999) => 3 digits === base 2(1111100111) => 10 digits I am currently using a ta… Read more Is There A Formula For Calculating Or Estimating The Number Of Digits Of A Binary Integer?

Merge Two Arrays And Sort The Final One

In an interview I was asked the following question. I am given two arrays, both of them are sorted… Read more Merge Two Arrays And Sort The Final One

Algorithm To Re-index An Array Of Objects After Insertion Or Drag 'n' Drop Order Change

Assume I have an indexed array of objects, such as these containing lines of a popular folk song ;)… Read more Algorithm To Re-index An Array Of Objects After Insertion Or Drag 'n' Drop Order Change

Javascript Algorithms: Find Starting And Ending Indices Of Consecutively Repeated Chars From A String

I wanted to function a function that does this: const input =“hellooooloo”; const results = getRepe… Read more Javascript Algorithms: Find Starting And Ending Indices Of Consecutively Repeated Chars From A String

Returning The Length Of The Shortest Word In A String In Javascript

I'm trying to write a function that returns the length of the shortest word in a string. It onl… Read more Returning The Length Of The Shortest Word In A String In Javascript

Finding All Connected Components Of An Undirected Graph

I have a list of objects (undirected edges) like below: pairs = [ pair:['a2', 'a5'… Read more Finding All Connected Components Of An Undirected Graph