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 representing a Queue. | |
* @constructor | |
*/ | |
class Queue { | |
constructor() { | |
this._storage = {}; | |
this._length = 0; | |
this._headIndex = 0; |
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 representing a Stack. */ | |
class Stack { | |
constructor() { | |
this._storage = {}; | |
this._length = 0; | |
} | |
/* | |
* Adds a new value at the end of the stack |
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
{ | |
"quotes":[ | |
{ | |
"quote":"Genius is one percent inspiration and ninety-nine percent perspiration.", | |
"author":"Thomas Edison" | |
}, | |
{ | |
"quote":"You can observe a lot just by watching.", | |
"author":"Yogi Berra" | |
}, |
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
/* | |
Program to count vowels, consonant, digits and special characters in string. | |
Given a string and the task is to count vowels, consonant, digits and special character in string. Special character also contains the white space. | |
Problem Link: https://www.geeksforgeeks.org/program-count-vowels-consonant-digits-special-characters-string/ | |
Solution Time Complexity: O(n) -> Where 'n' is the length of the string. | |
*/ | |
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
/* | |
Find one extra character in a string | |
Given two strings which are of lengths n and n+1. The second string contains all the character of the first string, but there is one extra character. Your task to find the extra character in the second string. | |
Problem Link: https://www.geeksforgeeks.org/find-one-extra-character-string/ | |
Solution Time Complexity: O(n) | |
*/ | |
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
cls | |
if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) { | |
Add-PSSnapin Microsoft.SharePoint.PowerShell; | |
} | |
$sourceWebURL = "http://sp2010/sites/" | |
$sourceListName = "Library Name" | |
$spSourceWeb = Get-SPWeb $sourceWebURL | |
$spSourceList = $spSourceWeb.Lists[$sourceListName] |
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
cls | |
if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) { | |
Add-PSSnapin Microsoft.SharePoint.PowerShell; | |
} | |
$sourceWebURL = "http://sp2010/sites/" | |
$sourceListName = "Library Name" | |
$spSourceWeb = Get-SPWeb $sourceWebURL | |
$spSourceList = $spSourceWeb.Lists[$sourceListName] |