python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Determining language from a grammar
I'm trying to solve an exercise on grammars and languages. Here is the exercise:
Let the grammar G be:
G = {V, T, P, S},
V = {S, A, B},
T = {a, b, c},
P = {S → ABA; A → a | bb; B → bS | ε}
What la...
Draconyx
Votes: 0
Answers: 1
Time complexity for partitioning a set and sorting the partition's subsets
Suppose I have a function which partitions set S, |S|=n, into S/subsetSize subsets of size subsetSize and sorts each subset:
partitionAndSort(Set s, int subsetSize) {
List partition = partitionList...
super.t
Votes: 0
Answers: 1
Convert Integer number to a Boolean List with 3 elements (Java)
I have an integer number withing an interval [0,7]. And I want to convert this number into a Boolean list with 3 elements with Java.
1st element in the list has a value of 4, 2nd element has 2 and 3rd...
firefighter
Votes: 0
Answers: 3
Two 2d Arrays Sum
I'm trying to take two 2d array inputs, and then add them together, but it won't compile correctly. For some reason if i declare the 'addedMatrix' outside of the method the code compiles but the added...
Techy
Votes: 0
Answers: 1