• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "algorithms". Back to normal view
    1. Programming Challenge: Two Wizards algorithm challenge

      I'm running out of ideas, if you have any, please make your own programming challenge. This challenge is about designing algorithm to solve this problem. Let's have game field of size x, y (like...

      I'm running out of ideas, if you have any, please make your own programming challenge.


      This challenge is about designing algorithm to solve this problem.

      Let's have game field of size x, y (like in chess). There are two wizards, that are standing at [ 0, 0 ] and are teleporting themselves using spells. The goal is to not be the one who teleports them outside of the map. Each spell teleports wizard by at least +1 tile. Given map size and collection of spells, who wins (they do not make any mistakes)?

      Here are few examples:


      Example 1

      x:4,y:5

      Spells: { 0, 2 }

      Output: false

      Description: Wizard A starts, teleporting both of them to 0, 2. Wizard B teleports them to 0, 4. Wizard A has to teleport them to 0,6, which overflows from the map, so he loses the game. Because starting wizard (wizard A) loses, output is false.

      Example 2

      x:4,y:4

      Spells: { 1,1 }

      Output: true

      Example 3

      x:4,y:5

      Spells: { 1,1 },{ 3,2 },{ 1,4 },{ 0,2 },{ 6,5 },{ 3,1 }

      Output: true

      Example 4

      x:400,y:400

      Spells: {9,2},{15,1},{1,4},{7,20},{3,100},{6,4},{9,0},{7,0},{8,3},{8,44}

      Ouput: true


      Good luck! I'll comment here my solution in about a day.

      Note: This challenge comes from fiks, programming competition by Czech college ČVUT (CTU).

      15 votes
    2. Instagram feed algorithm seems to take into account your WhatsApp correspondence.

      I've been trying to tame tracking from services like Facebook. I installed many ad blockers and tracker blockers on all of my browser, I don't install FB app on my phone, but I still install...

      I've been trying to tame tracking from services like Facebook. I installed many ad blockers and tracker blockers on all of my browser, I don't install FB app on my phone, but I still install Instagram app and WhatsApp.

      Something creepy (but totally expected) just happened to me. I haven't really been in contact with a friend of mine for quite some time, and we finally chatted again using WhatsApp. Not long after that I opened Instagram, and her photo was the first one I saw haha. It's funny because I don't think I've seen any photos from her in quite some time before this on my IG feed.

      Might just be a coincidence, but with all discussion about how creepy they're trying to make their platform as sticky as possible, I wouldn't be surprised if IG's feed algorithm do take into account your correspondence on WhatsApp as well (I live in a country where everyone uses WhatsApp).

      10 votes