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
| ### Keybase proof | |
| I hereby claim: | |
| * I am sharunkumar on github. | |
| * I am sharunkumar (https://keybase.io/sharunkumar) on keybase. | |
| * I have a public key ASBSekqzGALQs8Ki4rIXBoNiu0H5tYINN6wwNX078j-PsAo | |
| To claim this, I am signing this object: |
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
| #SingleInstance, force | |
| global PreviousActiveWindow | |
| ; Requires windows terminal preview: https://www.microsoft.com/en-us/p/windows-terminal-preview/9n0dx20hk701 | |
| #`:: | |
| DetectHiddenWindows, On | |
| if (WinExist("ahk_class CASCADIA_HOSTING_WINDOW_CLASS")) { | |
| if(WinActive("ahk_class CASCADIA_HOSTING_WINDOW_CLASS")) { |
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
| pm uninstall -k --user 0 com.eterno | |
| pm uninstall -k --user 0 com.king.candycrushsaga | |
| pm uninstall -k --user 0 com.opera.max.oem | |
| pm uninstall -k --user 0 com.opera.max.preinstall | |
| pm uninstall -k --user 0 com.snapchat.android | |
| pm uninstall -k --user 0 in.amazon.mShop.android.shopping | |
| pm uninstall -k --user 0 in.mohalla.sharechat | |
| pm uninstall -k --user 0 in.mohalla.video |
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 UnionFind { | |
| private int[] root; | |
| private int[] rank; | |
| public UnionFind(int n) { | |
| this.root = new int[n]; | |
| this.rank = new int[n]; | |
| for (int i = 0; i < n; ++i) { | |
| this.root[i] = i; | |
| this.rank[i] = 1; | |
| } |
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 { | |
| public ListNode deleteMiddle(ListNode head) { | |
| // Edge case: return nullptr if there is only one node. | |
| if (head.next == null) | |
| return null; | |
| // Initialize two pointers, 'slow' and 'fast'. | |
| ListNode slow = head, fast = head.next.next; | |
| // Let 'fast' move forward by 2 nodes, 'slow' move forward by 1 node each step. |
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
| // ==UserScript== | |
| // @name Copy Job Description | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description Adds a "Copy Job Description" button to amazon.jobs listing | |
| // @author sharunkumar | |
| // @match https://www.amazon.jobs/en/jobs/*/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.jobs | |
| // @grant none | |
| // ==/UserScript== |
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
| cd $env:APPDATA\Code\User | |
| Get-ChildItem .\profiles\ | % { copy .\keybindings.json "$_\keybindings.json" } |
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://www.geeksforgeeks.org/lexicographically-smallest-string-possible-by-using-given-operations/ | |
| // Given a string S consisting of digits from 0 to 9 inclusive, the task is to form the lexicographically | |
| // smallest string by performing an operation any number of times. In one operation you can choose any | |
| // position i and delete the digit d at s[i] and insert min(d+1, 9) on any position (at the beginning, | |
| // at the end, or in between any two adjacent digits). | |
| import java.io.*; | |
| import java.util.*; | |
| import java.util.PriorityQueue; | |
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
| // Java program to check if two strings | |
| // areIsomorphic | |
| import java.io.*; | |
| import java.util.*; | |
| class GFG { | |
| static boolean areIsomorphic(String str1, String str2) | |
| { |
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 BSTIterator { | |
| Stack<TreeNode> stack; | |
| public BSTIterator(TreeNode root) { | |
| this.stack = new Stack<TreeNode>(); | |
| this._leftmostInorder(root); | |
| } | |
| private void _leftmostInorder(TreeNode root) { |
OlderNewer