This file contains 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
<template> | |
<div id="todos-vue"> | |
<div> | |
<label>New task:</label> | |
<!-- use v-model for 2-way binding, call method when user press enter @keyup.enter--> | |
<input id="new_todo" v-model="new_todo" placeholder="edit me" @keyup.enter="add_todo()"> | |
<button @click="add_todo()">Add</button> | |
</div> | |
<div> | |
<div v-for="(todo, index) in todos" :key="todo.id"> |
This file contains 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
def merge(lefthalf, righthalf): | |
i=j=0 | |
sorted_list = [] | |
while i < len(lefthalf) and j < len(righthalf): | |
if lefthalf[i] < righthalf[j]: | |
sorted_list.append(lefthalf[i]) | |
i=i+1 | |
else: | |
sorted_list.append(righthalf[j]) |
This file contains 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
{"lastUpload":"2020-12-28T21:41:20.271Z","extensionVersion":"v3.4.3"} |
NewerOlder