This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These are SP500 prices for practicing sliding window and array problems. | |
# Q: What date was the largest adjusted close price? | |
# Q: What was the longest period of open prices between $3000.00 and $4000.00? | |
# Q: What was the longest period of increasing open prices? | |
# Q: What is the most profitable period to buy at the open and sell at the close? | |
# Q: What is the highest average close price in any 6 month consecutive window of time? | |
headers = ["Date","Open","High","Low","Close","Adj Close"] | |
data = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Q: what are all the shortest paths from a single node to all other nodes? | |
""" | |
Example: All shortest paths from id:0 to all other nodes | |
{0: [[]], | |
1: [[1]], | |
2: [[2]], | |
3: [[1, 3], [2, 3]], | |
4: [[1, 3, 4], [2, 3, 4]], | |
5: [[1, 3, 4, 5], [2, 3, 4, 5]], |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.