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
class Solution: | |
def lengthOfLongestSubstring(self, s: str) -> int: | |
n = len(s) | |
ans = 0 | |
# mp stores the current index of a character | |
mp = {} | |
i = 0 | |
# try to extend the range [i, j] | |
for j in range(n): |
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
# Python3 program to reverse a queue | |
from queue import Queue | |
# Utility function to print the queue | |
def Print(queue): | |
while (not queue.empty()): | |
print(queue.queue[0], end = ", ") | |
queue.get() | |
# Function to reverse the queue |
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
class Node: | |
def __init__(self, data): | |
self.data = data | |
self.next = None | |
class LinkedList: | |
def __init__(self): |
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
# Python program to illustrate string | |
def uniqueCharacters(str): | |
# If at any time we have samme | |
# characters, return false | |
for i in range(len(str)): | |
for j in range(i + 1,len(str)): | |
if(str[i] == str[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
name: "Pull Request Labeler" | |
on: | |
- pull_request | |
jobs: | |
triage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/labeler@v2 | |
with: |
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
# Add 'label1' to any changes within 'example' folder or any subfolders | |
label1: | |
- example/**/* | |
# Add 'label2' to any file changes within 'example2' folder | |
label2: example2/* |
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
name: A workflow for my Hello World file | |
on: push | |
jobs: | |
build: | |
name: Hello world action | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: ./action-a | |
with: |
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
name: "Hello Actions" | |
description: "Greet someone" | |
author: "octocat@github.com" | |
inputs: |
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
#!/bin/sh -l | |
sh -c "echo Hello world my name is $INPUT_MY_NAME" |
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
FROM debian:9.5-slim | |
ADD entrypoint.sh /entrypoint.sh | |
RUN ["chmod", "+x", "/entrypoint.sh"] | |
ENTRYPOINT ["/entrypoint.sh"] |