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
https://www.reddit.com/r/AskElectronics/comments/2czxkg/fun_breadboard_projects_for_kids/ | |
http://www.electronicshub.org/electronics-mini-project-circuits/ | |
https://www.reddit.com/r/breadboard | |
https://startingelectronics.org/beginners/start-electronics-now/tut1-breadboard-circuits/ | |
https://learn.adafruit.com/ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>image processing </title> | |
</head> | |
<body> | |
<canvas id='picasso' style='border:1px solid red,float:left' width=400 height=300></canvas> | |
<canvas id='picasso2' width=400 height=300></canvas> | |
<script type='text/javascript'> |
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
GSoC Final Evaluation Report | |
# Project Goal | |
Enable Genoverse genome browser to parse and render large genomic binary data formats like Bigwig, Bigbed and compressed VCF. In order to do so I wrote javascript parsers for these file formats and the rendering code ( wherever it was missing ). I also wrote code to support the simpler text formats of Wiggle and BED in order to make the code simpler for the binary versions ( bigwig and bigbed ). | |
# List of Commits | |
https://github.com/wtsi-web/Genoverse/commits/gh-pages?author=sourabh2k15 |
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
defmodule Async do | |
@n_clients 100000 | |
def createFollowersSync(n_clients) do | |
Enum.reduce(1..n_clients, [], fn rank, acc -> | |
acc ++ [Util.pickRandom(@n_clients, rank)] | |
end) | |
end | |
def createFollowersAsync(n_clients) do |
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
class Solution { | |
public: | |
vector<int> inorderTraversal(TreeNode* root) { | |
vector<int> inorder; | |
stack<TreeNode*> nodes; | |
if(root == NULL) return inorder; | |
while(root != NULL || !nodes.empty()){ | |
//push left children if available |
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
class Solution { | |
public: | |
bool isValidBST(TreeNode* root) { | |
if(root == NULL) return true; | |
stack<TreeNode*> s; | |
TreeNode* prev = NULL; | |
while(root != NULL || !s.empty()){ | |
while(root != NULL){ |
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
class Solution { | |
public: | |
int kthSmallest(TreeNode* root, int k) { | |
stack<TreeNode*> s; | |
while(root != NULL || !s.empty()){ | |
while(root != NULL){ | |
s.push(root); | |
root = root->left; | |
} |
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
class Solution { | |
public: | |
/* | |
Intuition: | |
1) every node has to be a left or right child of some node, except the root ofcourse | |
2) every non "#" node means it has 2 leaves so a valid preorder string would have 2 more values | |
3) Using 1 and 2, set totalnodes = 0. Add 2 to totalnodes if non "#" value encountered and decrement totalnodes for having processed present value | |
4) Using this scheme, totalnodes should equal 0 at end if it's a valid preorder string. | |
5) We start with totalnodes = 1 instead of 0 cause inside loop it does totalnodes-- for every value , which includes | |
root value as well. |
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
class Trie { | |
private: | |
class TrieNode{ | |
public: | |
bool isWord; | |
vector<TrieNode*> next; | |
TrieNode() : next(vector<TrieNode*>(26, NULL)), isWord(false){} | |
~TrieNode(){ | |
for(auto node: next) delete node; |
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
class Solution { | |
public: | |
// M is the friend matrix provided | basic intuition: we need connected components in graph, which can be done by BFS / DFS. | |
// why does this work ? because applying transitive property to this : a friend of b, b friend of c , c friend of d | |
// a,b,c,d should fall into 1 friend circle, just imagine a,b,c,d to be nodes of graph and they are connected by an edge if they | |
// are friends else not connected by an edge, so simply finding the total groups / connected components gives us the answer. | |
int findCircleNum(vector<vector<int>>& M) { | |
vector<bool> friendZoned(M.size(), false); // array to keep track of visited in DFS | |
stack<int> dfs; // stack to execute DFS |
OlderNewer