Questions tagged [bottom-up]
84 questions
1
vote
1 answer
Coin Change Bottom Up Dynamic Programming
http://uva.onlinejudge.org/external/6/674.html I'm trying to solve that problem. Note, though, that it's not the minimum coin change problem, it asks me for the different number of ways to make N cents using 50, 25, 15, 10, 5 and 1 cent coins. It's…

David Gomes
- 5,644
- 16
- 60
- 103
1
vote
1 answer
GEF: How to draw diagram bottom up
I'm trying to draw a tree within a GEF editor. The problem is that I need to draw it bottom up. I have a primary layer for the node figures, and a connection layer for the connections.
The primary layer is a FreeformLayer, the root edit part a…

QueNuevo
- 105
- 12
0
votes
0 answers
How to read excel bottom up in python
How can I read excel rows from bottom up.
Reading them top to bottom with the following code has no problem at all
for row in range(2, ws.max_row+1):
print(ws.cell(row, 1).value)
But doing for loop in reverse doesn't print a thing. Is…

la_mun
- 5
- 3
0
votes
1 answer
How do you implement the bottom-up and top-down approach in this problem?
I am given a grid or n * n. I need to find how many routes I can take to get from grid[0][0] to grid[n - 1][n - 1]. However in the grid there will be the letter 'H' in some of the spaces. If there is an "H", I cannot cross that place. I can only go…

Erin Yeh
- 5
- 1
0
votes
1 answer
Count the sum of subsets of size k when the sum is (Greater than or equal to R) or (Lesser than or equal to L)
def knapSack(A,L,R,K,N,Sum):
if(K==0):
if((L>=Sum)or(R<=Sum)):
return 1
else:
return 0
if((N==0)and(K!=0)):
return 0
else:
return…

Arun kumar
- 11
- 3
0
votes
1 answer
Runtime Error when Trying Bottom Up Approach to Implement Fibonacci function in Swift?
I am trying to implement a Fibonacci function in Swift 5. While I was implementing the function on Xcode Playground (I took the code for the function from CSDojo's youtube video), I was encountered with this error message
error: Execution was…

Junsu Kim
- 356
- 3
- 13
0
votes
1 answer
when adding new text it appears on bottom and rest of text goes up
I want to display text on the text box that says if I hit and how much damage I do and vice versa for the enemy, but I just can't figure out how to make the text to display in this manner.
Here is the code I'm working on:
def textBox(textv):
…

Dannidona
- 13
- 2
0
votes
1 answer
Output produced for the given input using the bottom up parsing
I tried solving this question and the answer comes out to be option c. But in few textbooks answer given is option b. I am confused what would be the correct answer? Plz help me out!

Sinchit Batham
- 103
- 1
- 2
- 10
0
votes
1 answer
L-attributed grammar and bottom-up parsing
I am trying to understand what is the relationship between L-attributed grammars and computing attributes during bottom-up parsing. Is it always possible to compute all attributes during syntax tree creation for every context-free grammar or just…

SimpleName
- 129
- 2
- 6
0
votes
1 answer
Parsing table size (bottom-up)
I've seen a comparison between sizes of parsing tables constructed for ambiguous and unambiguous grammar (of the same language). The one created for ambiguous was significantly smaller. The used parser was SLR(1).
I would like to ask you, is it…

SimpleName
- 129
- 2
- 6
0
votes
1 answer
Why does the last element reflect the number of non-negative solutions?
Please excuse my naivete as I don't have much programming experience. While googling something for an unrelated question, I stumbled upon this:
https://www.geeksforgeeks.org/find-number-of-solutions-of-a-linear-equation-of-n-variables/
I completely…
0
votes
1 answer
Top Down Vs Bottom Up - Normalisation
Could someone describe for me the differences between top down normalisation and bottom up normalisation with regards to databases, namely relational databases.

user559142
- 12,279
- 49
- 116
- 179
0
votes
0 answers
Is a table (from source system) that contains only relationships and current status of a row from another table a fact table in Data Warehouse?
I am developing a BI system for our company, from scratch, and currently, I am designing a data warehouse. I am completely new to this so there are many things that I don't really understand, so I need to hear some more insights into this.
My…

Pblade
- 133
- 1
- 9
0
votes
2 answers
Is Recursion W/Memoization In Staircase Problem Bottom-Up?
Considering the classical staircase problem as "Davis has a number of staircases in his house and he likes to climb each staircase 1, 2, or 3 steps at a time. Being a very precocious child, he wonders how many ways there are to reach the top of the…

cs guy
- 926
- 2
- 13
- 33
0
votes
1 answer
What production rule should I use to reduce in bottom-up parsing?
So far, my understanding of the algorithm of bottom-up parsing is this.
shift a token into the stack
check the stack from top if some elements including the top can be reduced by some production rule
if the elements can be reduced, pop and push…

skullmind
- 37
- 4