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
| Param( | |
| [Parameter(Mandatory = $false)] | |
| [String[]] | |
| $SubscriptionIds | |
| ) | |
| #Log in to Azure account | |
| if ([string]::IsNullOrEmpty($(Get-AzContext).Account)) { Connect-AzAccount } else { Write-Host "Already logged in" } | |
| #Get the list of Azure Subscription ID's |
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
| class Solution: | |
| # Given a sorted array, remove the duplicates in place such that each element can appear atmost twice and return the new length. | |
| # @param A : list of integers | |
| # @return an integer | |
| def removeDuplicates(self, A): | |
| if len(A) < 2: | |
| return len(A) | |
| index = 0 | |
| while index < (len(A)): | |
| if A[index] == A[index - 2]: |
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: | |
| # def __init__(self, x): | |
| # self.val = x | |
| # self.next = None | |
| class Solution: | |
| # @param A : head node of linked list | |
| # @return the first node in the cycle in the linked list | |
| def detectCycle(self, A): |
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: | |
| # def __init__(self, x): | |
| # self.val = x | |
| # self.next = None | |
| class Solution: | |
| # @param A : head node of linked list | |
| # @return the head node in the linked list | |
| def deleteDuplicates(self, A): |