##DSL
###Datatypes supported:
#####integer,float,string,boolean,long_integer,character
####DSL for Variables:
DSL: Datatype(name)
#####Example:
- integer(a);
- integer(n) integer(k)
####DSL for Number of test cases:
DSL:
loop(name)
{some code}
endloop
#####Example:
integer(t)
loop(t)
{code}
endloop
####DSL for Array
DSL: Array(Datatype,name,size,type)
where type={single or multi}
#####Example:
- Array(integer,a,n,single)
- Array(float,b,m,multi)
####DSL for 2DArray
DSL: 2DArray(Datatype,name,size1,size2)
#####Example:
2DArray(integer,a,n,m)
DSL: #StartCode
(This will generate a comment in different languages that user can start coding from here)
Example output of #StartCode:
- C: //your code goes here
- Python: #your code goes here
####Examples of DSL from various problems:
https://www.hackerrank.com/challenges/mark-and-toys
integer(n) integer(k)
Array(integer,a,n,single)
https://www.hackerrank.com/challenges/two-arrays
integer(t)
loop(t)
integer(n) integer(k)
Array(integer,a,n,single)
endloop
https://www.hackerrank.com/challenges/flowers
integer(n) integer(k)
Array(integer,a,n,single)
https://www.hackerrank.com/challenges/tree-pruning
integer(n) integer(k)
Array(integer,a,n,single)
2DArray(integer,edges,n-1,2)
https://www.hackerrank.com/challenges/stockmax
integer(t)
loop(t)
integer(n)
Array(integer,a,n,single)
endloop
https://www.hackerrank.com/challenges/cavity-map
integer(n)
2DArray(character,grid,n,n+1)
https://www.hackerrank.com/challenges/service-lane
integer(n) integer(t)
Array(integer,a,n,single)
loop(t)
integer(i) integer(j)
endloop
can any one put the code stubs for tree generation plz