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: | |
int myAtoi(string str) { | |
int ans=0; | |
int p=0; | |
if(str.length()==0) | |
return 0; | |
char sign=' '; | |
for(int i=0;i<str.length();i++) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
JavaScript primer | |
->var keyword for a vraibale | |
->Data types: Number,String, Boolean, Object, Null, Undefined | |
->Null points to a deliberate non value whereas undefined points to an uinitialized value | |
Scoping | |
->Javascript has functional level scoping over block level scoping | |
-> What happens if you miss the var keyword | |
(function(){ | |
(function(){ |