Skip to content

Instantly share code, notes, and snippets.

View sabique's full-sized avatar
👨‍💻

Sabique A Khan sabique

👨‍💻
  • India
View GitHub Profile
/** Class representing a Queue.
* @constructor
*/
class Queue {
constructor() {
this._storage = {};
this._length = 0;
this._headIndex = 0;
/** Class representing a Stack. */
class Stack {
constructor() {
this._storage = {};
this._length = 0;
}
/*
* Adds a new value at the end of the stack
{
"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"
},
@sabique
sabique / count-vowels-consonant-digits-special-characters-string.cs
Created August 1, 2018 18:27
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.
/*
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.
*/
@sabique
sabique / Find-one-extra-character-in-a-string.cs
Created July 31, 2018 18:16
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.
/*
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)
*/
@sabique
sabique / update-column.ps1
Last active August 20, 2016 08:45
SharePoint 2010 : Update the value of a column in library
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]
@sabique
sabique / get-documents.ps1
Created August 20, 2016 08:05
SharePoint 2010 - Power Shell script to get list of documents from a library
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]