Skip to content

saadaltabari/nearst-smaller-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Nearest Smaller Number

This repo contains a script which was developed for solving a HackerRank problem. The problem was the following:

For any given array of Stock prices StockPrices of size n (0 < n < 1000000). StockPrices[i] is an integer representing stock price on day i. where 0 < i < n and 0 < StockPrices[i] < 1000000.

For an array of days Days of size m (0 < m < n). Days[j] is an integer representing a day to be queried where j (0 < j < m). Find the nearest day X from StockPrices where StockPrices[X] < StocPrices[Days[j]]

Enhancemnts

working on generalizing this scritp by implementing it as a library for finding the nearest smaller number.

About

nearst-smaller-number

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages