This document is written to help JavaScript developers to understand JavaScript's weird parts deeply and to prepare for interviews, the following resources was really helpful to write this document:
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
| import React from 'react' | |
| import './styles.scss' | |
| import { elem } from '_helpers/css' | |
| /** | |
| * @param {length} number - Default value is 4 | |
| * @param {error} string - Default value is none | |
| * @param {placeholder} string - Default value is none | |
| * @param {onChange} function - Default value is none | |
| */ |
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
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| int t; | |
| cin>>t; | |
| while(t--){ | |
| int n; | |
| cin>>n; | |
| int arr[n][n]; | |
| for(int i=0;i<n;i++) |
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
| #include <iostream> | |
| #include<cmath> | |
| using namespace std; | |
| unsigned long long ffnum(unsigned long long x){ | |
| long long p=1; | |
| unsigned long long sol=0; | |
| while(x){ | |
| if(x&1){ | |
| sol+=p; |
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
| #include <iostream> | |
| #include<climits> | |
| using namespace std; | |
| int main() { | |
| int t; | |
| cin>>t; | |
| while(t--){ | |
| int n; | |
| cin>>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
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| //code for find isprime | |
| //time complexity is: nlog n | |
| int lim=1000000; | |
| int isprime[lim]={0}; | |
| isprime[0]=isprime[1]=1; | |
| for(int i=2;i<lim;i++){ |