Skip to content

Instantly share code, notes, and snippets.

@MartenCatcher
MartenCatcher / Solution.java
Last active August 12, 2021 18:34
Time comparison
// https://leetcode.com/problems/count-items-matching-a-rule
class Solution {
public static int ruleToKey(String ruleKey) {
int key = 0;
switch(ruleKey) {
default:
case "type":
key = 0;
break;
case "color":
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
n = int(input())
data = []
for i in range(n):
data.append(list(map(int, input().split())))