The initial source comes from sdcuike/issueBlog#4
https://github.com/PacktPublishing free to download books code by Packet
https://github.com/EbookFoundation/free-programming-books Very immense
def is_valid_state(state): | |
# check if it is a valid solution | |
return True | |
def get_candidates(state): | |
return [] | |
def search(state, solutions): | |
if is_valid_state(state): | |
solutions.append(state.copy()) |
def findSchedules(workHours, dayHours, pattern): | |
totalHours = 0 | |
result = [] | |
for c in pattern: | |
if c != '?': | |
totalHours = totalHours + int(c) | |
diff = workHours - totalHours | |
constructResult(list(pattern), 0, diff, dayHours, result) | |
return result |
https://github.com/PacktPublishing free to download books code by Packet
https://github.com/EbookFoundation/free-programming-books Very immense
It is loaded by default by /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist.
If you run
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
function createAndInitialize2DArray(size) { | |
// catch a bug & fix me! | |
var defaultValue = 0; | |
var twoDimensionalArray = []; | |
function initOneDArray() { | |
var row = []; | |
for (var i = 0; i < size; i++) { | |
row.push(defaultValue); | |
} |
class ListNode:
def __init__(self, val=None):
self.val = val
self.next = None
self.size = 0
if val:
self.size = 1
def add_to_last(self, x):