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
{https://m.facebook.com}/pages/launchpoint/admin_invites/ | |
{https://m.facebook.com}/pages/launchpoint/liked_pages/ | |
{https://m.facebook.com}/pages/launchpoint/owned_pages/ | |
{https://m.facebook.com}/pages/launchpoint/pending_invites/ | |
fb-service://limit_friend_requests | |
fb://about | |
fb://account/recovery | |
fb://account_settings |
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
#!/usr/bin/env bash | |
rm -rf "${HOME}/Library/Caches/CocoaPods" | |
rm -rf "`pwd`/Pods/" | |
pod update |
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
// Make sure to include this at the top of AppDelegate.m | |
@import UserNotifications; | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
// Override point for customization after application launch. | |
// Check Notification Settings on launch | |
[[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) { | |
switch (settings.authorizationStatus) { | |
// This means we have not yet asked for notification permissions | |
case UNAuthorizationStatusNotDetermined: |
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
function arrayManipulation(n, queries) { | |
// Write your code here | |
var arr = Array(n + 1).fill(0); | |
var max = 0; | |
var x = 0; | |
for(var query of queries) { | |
const [a, b, k] = query; | |
arr[a] += k; | |
if(b+1 <= n) { | |
arr[b+1] -= k; |
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
// Complete the minimumSwaps function below. | |
function minimumSwaps(arr) { | |
var swaps = 0; | |
for(var i=0; i< arr.length; i++) { | |
while(arr[i] !== i + 1) { | |
let j = arr[i] - 1; | |
let tem = arr[i]; | |
arr[i] = arr[j]; | |
arr[j] = tem; | |
swaps ++; |
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
function Node(key) { | |
this.key = key; | |
this.left = null; | |
this.right = null; | |
this.parent = null; | |
} | |
function BSTree() { | |
this.root = null; | |
} |
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 TrieNode { | |
var key: Character? | |
var children: [Character: TrieNode] = [:] | |
weak var parent: TrieNode? | |
var end: Bool | |
init(_ key: Character?) { | |
self.key = key | |
self.children = [:] | |
self.parent = nil | |
self.end = false |
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
const romanCode = { | |
1000:'M', | |
900: 'CM', | |
500:'D', | |
400: 'CD', | |
100: 'C', | |
90: 'XC', | |
50: 'L', | |
40: 'XL', |
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
/*Roman to Decimal*/ | |
/** | |
Algorithm | |
Loop through each character in the string containing the roman numerals. | |
Compare the value of the current roman symbol with the value of the roman symbol to its right. | |
If the current value is greater than or equal to the value of the symbol to the right, add the current symbol’s value to the total. | |
If the current value is smaller than the value of the symbol to the right, subtract the current symbol’s value from the total. | |
**/ |
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
/* ATM */ | |
/** | |
Input the amount, return the notes | |
Asume that there are types: 1000, 100, 50, 10, 5, 2, 1 | |
Example: 1200 USD: | |
**/ | |
let result = {}; | |
let notes = [100, 50, 10, 5, 2, 1]; | |
let index = 0; |
NewerOlder