New answers tagged

1 vote

React Native screen to add a city to a weather app using a REST API

The code looks good and clean but as per my evaluation following things should be taken care of There should be folder structure for Component, Actions, Routers(APIs), Screens etc. There should be ...
user avatar
  • 111
2 votes

Find first and last matches on a sorted list

Binary search This should be a binary search as that is the expected algorithm. Why? because the array is sorted. Your function does not take advantage of the fact that the elements are sorted. ...
user avatar
  • 19.9k
1 vote

Find the 'n' most frequent words in a text, aka word frequency

Comments are inline in /// ...
user avatar
  • 121
0 votes

Find first and last matches on a sorted list

A short review; I prefer list over arr, because I prefer fully spelled out words above abbreviations, but I like obvious one ...
user avatar
  • 32.4k
0 votes

Find first and last matches on a sorted list

You answer seems fine. Don't worry about how other people have solved the same problem. The break/continue logic is not bad GIVEN the question, but you should definitely comment in your code what the ...
user avatar
0 votes

Find first and last matches on a sorted list

Here is a revised, simpler version of your code. ...
user avatar
  • 3,273

Top 50 recent answers are included