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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Cursor to command</name> | |
<item> | |
<name>Arrow to Control_L</name> | |
<identifier>remap.arrows2controlR</identifier> | |
<autogen>__KeyToKey__ KeyCode::CURSOR_RIGHT, KeyCode::CONTROL_R</autogen> | |
<autogen>__KeyToKey__ KeyCode::CURSOR_LEFT, KeyCode::CONTROL_R</autogen> |
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
compile: | |
rm -f Inversions | |
stack ghc -- -O2 --make -prof -caf-all -auto-all Inversions.hs | |
only_compile: | |
rm -f Inversions | |
stack ghc -- -O2 --make -auto-all Inversions.hs | |
run_tests: only_compile | |
./Inversions |
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
# https://leetcode.com/problems/median-of-two-sorted-arrays/ | |
from bisect import bisect_left | |
from itertools import takewhile | |
class Solution(object): | |
def count_prefix(self, start_idx, st, char): | |
""" Starting from the start index, checks how many times given character | |
repeated""" |
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
# Definition for singly-linked list. | |
# class ListNode(object): | |
# def __init__(self, x): | |
# self.val = x | |
# self.next = None | |
class Solution(object): | |
def deleteNode(self, node): | |
""" | |
:type node: ListNode |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
service Calculator { | |
/** | |
* A method definition looks like C code. It has a return type, arguments, | |
* and optionally a list of exceptions that it may throw. Note that argument | |
* lists and exception lists are specified using the exact same syntax as | |
* field lists in struct or exception definitions. | |
*/ | |
void ping(), |
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.
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
# Definition for singly-linked list. | |
# class ListNode(object): | |
# def __init__(self, x): | |
# self.val = x | |
# self.next = None | |
class Solution(object): | |
def insert(self, head, node): | |
if head is None: | |
node.next = None |
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
--https://leetcode.com/problems/merge-intervals/ | |
module Main where | |
import Test.HUnit | |
import Data.List(sort) | |
data Interval = Interval Int Int deriving (Show, Eq, Ord) | |
merge :: [Interval] -> [Interval] | |
merge intervals = merge' $ sort intervals | |
where |