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
// Print the nodes of binary tree column wise | |
/* | |
Input: | |
8 | |
/ \ | |
6 10 | |
/ \ / \ | |
4 7 9 12 |
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
//http://www.glassdoor.com/Interview/Given-a-large-input-string-write-a-function-to-check-if-it-is-a-palindrome-according-to-the-following-restrictions-low-QTN_927605.htm | |
//Given a large input string, write a function to check if it is a palindrome, | |
//according to the following restrictions: -lowercase and uppercase characters are considered equal -special characters are ignored | |
var aCode = "a".charCodeAt(0); | |
var ACode = "A".charCodeAt(0); | |
var setLen = 26; | |
function isChar(char) { |
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
/* | |
Given an array of positive integers and a target integer, find if there is a consecutive subarray that sums to the target. | |
E.g, given {5,6,4,12}, findsum(10)=true, findsum(11)=false. | |
http://www.glassdoor.com/Interview/Given-an-array-of-positive-integers-and-a-target-integer-find-if-there-is-a-consecutive-subarray-that-sums-to-the-target-QTN_984284.htm | |
*/ | |
function findSubarraySum(numbers, sum) { | |
var sumSoFar = 0; | |
var start = 0; | |
var end = 0; |
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
//React/Views/RCTViewSnapshotManager.h | |
// | |
// RCTViewSnapshot.h | |
// React | |
// | |
// Created by Kaila, Ashish on 7/30/15. | |
// Copyright (c) 2015 Facebook. All rights reserved. | |
// | |
#import "RCTViewManager.h" |