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
//weird recursion gen permutation paranthesis | |
package com.internet; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class PintAllPermutationOfParanthesis { | |
public static void printAllParanthesis(List<String> finalOp, int open, int close, int n){ | |
if(close==n){ | |
//for(String ls:finalOp) { |
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
reate Binary search tree | |
TreeNode t8=new TreeNode(8); | |
TreeNode t3=new TreeNode(3); | |
TreeNode t1=new TreeNode(1); | |
TreeNode t6=new TreeNode(6); | |
TreeNode t10=new TreeNode(10); | |
TreeNode t9=new TreeNode(9); | |
TreeNode t14=new TreeNode(14); |
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
package main | |
import ( | |
"fmt" | |
u "model" | |
) | |
func MapDemo() { |
NewerOlder