• Breaking News

    Saturday, September 11, 2021

    Modified shortest path Computer Science

    Modified shortest path Computer Science


    Modified shortest path

    Posted: 10 Sep 2021 07:58 PM PDT

    I'm trying to solve this problem: there's a drone, and given a source node and a destiny one, I have to find the shortest path between them, however, I have more three parameters: a initial charge (the drone starts with this charge in the source node), a list within the recharge points (nodes where drone battery recharge. It means if the drone reaches this point, it's battery will be maximum again) and maximum battery capacity. Always I travel to a node for other, my current charge is subtracted from the edge weight. I tried to use Dijkstra's algorithm, but it didn't work

    submitted by /u/henrico_01
    [link] [comments]

    Prerequisites to study and understand Analysis of Algorithms?

    Posted: 10 Sep 2021 03:49 PM PDT

    In which the mathematical analysis of average, worst, and best case is done. (Not just big O)

    submitted by /u/BadWolf2077
    [link] [comments]

    BrainTeaser Algorithm Sought

    Posted: 10 Sep 2021 04:15 PM PDT

    Hi,
    I thought of this brainteaser, well algorithm teaser I guess, earlier today and wondered if anyone had a novel solution (python). It's a puzzle that requires moving lists (like tetris blocks let's say) around to fit the shape of new ones.

    Consider this starting board:
    rows = [
    [('a','a','a'),0,0,0],
    [('b','b'),('c','c'),0,0],
    [('d','d','d'),('e',),0,0]
    ]

    ('a','a','a') represents "one shape", ('b','b') etc. Cannot be subdivided.
    0's are empty spaces. So given the board above, let's say you had to insert a new shape ('f','f','f','f').

    One solution is to move ('e',) to a nearby row, then move ('a','a','a') to the last row, freeing up 4 spots in first row. That solution would then be. In 3 moves (including final insert)

    rows = [
    [('f','f','f','f'),0,0],
    [('b','b'),('c','c'),('e',),0],
    [('d','d','d'),('a','a','a')]
    ]

    Algorithm would have to find the least move solutions. Any smarty pants out there?

    submitted by /u/northwolf56
    [link] [comments]

    Web Crypto API

    Posted: 10 Sep 2021 02:09 PM PDT

    I want to learn about Web Crypto API. Can anyone please tell me what are the things one should know before learning about this topic and where can i find resources to learn it.

    submitted by /u/Lazy_Explanation_239
    [link] [comments]

    No comments:

    Post a Comment