Due to global ecological restrictions, cities, particularly urban transportation, must choose ecological solutions. Sustainable bike-sharing systems (BSS) have become an important element in the worldwide transportation infrastructure as an alternative to fossil-fuel-powered cars in metropolitan areas. Nevertheless, the placement of docks, which are the parking areas for bikes, depends on accessibility to bike paths, population density, difficulty in bike mobility, commuting cost, the spread of docks, and route imbalance. The purpose of this study is to compare the performance of various time series and machine learning algorithms for predicting bike demand using a two-year historical log from the Capital Bikeshare system in Washington, DC, USA. Specifically, the algorithms tested are LSTM, GRU, RF, ARIMA, and SARIMA, and their performance is then measured using the MSE, MAE, and RMSE metrics. The study found GRU performed the best, with RF also producing reasonably accurate predictions. ARIMA and SARIMA models produced less accurate predictions, likely due to their assumptions of linearity and stationarity in the data. In summary, this research offers significant insights into the efficacy of diverse algorithms in forecasting bike demand, thereby contributing to future research in the field.