TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

SQLite3 Hash Code 2018

3 pointsby mingodadabout 7 years ago

1 comment

mingodadabout 7 years ago
Hello !<p>I&#x27;ve been looking ath the HASHCODE 2018 competition and got interested on the problem proposition:<p>Task Given a list of pre-booked rides in a city and a fleet of self-driving vehicles, assign the rides to vehicles, so that riders get to their destinations on time.<p>For every ride that finishes on time (or early), you will earn points proportional to the distance of that ride; plus an additional bonus if the ride also started precisely on time.<p>It took me a while to get something working and at end I saw that I was basically using sqlite3 capabilities to do the data manipulation tasks and only needed a few calculations for the rest.<p>So I tried to see if I also could make those calculations inside sqlite3 and after a while I could get it to work:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;mingodad&#x2F;sqlite3-hashcode-2018&#x2F;blob&#x2F;master&#x2F;hashcode2018.sql" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mingodad&#x2F;sqlite3-hashcode-2018&#x2F;blob&#x2F;maste...</a><p>As I stated there:<p>By no means I claim that solutions like this (stretching sqlite3) are good practice. Take it as an example that demonstrates several capabilities of sqlite3 in a hack&#x2F;compact way.<p>So I&#x27;m showing it here just in case it can help&#x2F;invite other people to find imaginative ways where sqlite3 can be used to solve problems.<p>Cheers !
评论 #16520926 未加载