Change to stack reference based

Is this possible change to Stack Reference Based??
If so , How to do it??
     private boolean solveHelper(int c, int r){
          if(r == n){
               solved = true;
               return true;
          if(c == n){
               return false;
          if(hasNoConflicts(c, r)){
               placePiece(c, r);
               boolean done = solveHelper(0, r+1);
               if(done) return true;
               else{
                    removePiece(c, r);
                    return solveHelper(c+1, r);
          else{
               return solveHelper(c+1, r);
     }

Ya..it is homework...
but we didn't taught how to unroll the recursive to
Stack, so that why i'm came up and ask!!!
So i'm beg you show me how?!You haven't been taught that?
The texts that you have do not cover it?
The teacher did not cover it?
And yet you have been assigned that homework?
Is part of the assignment supposed to be you doing your own research to find the methodology?
If the answer to the last is "no", then I suggest you drop the class and file a formal complaint with the adminstration.

Similar Messages

  • How to change the JCO reference of an existing model  in CE 7.1

    Hi All
    I have read an article which explains the method to change the JCO reference of model but when I tried to follow the same steps in CE 7.1 i am not able to find the category "Model Settings" (on clicking model edit option) containing the property "modelInstance_defaultLogicalSystem" which needs to be changed.
    So is there any other method that needs to be followed in CE 7.1 to change the JCO reference? or should i delete and recreate the models with new JCO reference.
    Any suggestions would be highly helpful.
    Regards,
    Ashwin Kulkarni.

    Hi Ashwin,
    I guess you are not opening the models node. Open the models node shown in the web dynpro explorer.
    ---local Development [project1]
    ----Web Dynpro
    ----Application
    ----Model
    --Model1                                <<<<----Click Here and select properties tab
    ----Model Classes
    ----Component Interfaces
    ----Components
    ----Dictionary
    ----Resources
    Then select the model for which you want to change the JCo references and then in teh properties tab you will find the desired propoerty and then just change the modelInstance_defaultLogicalSystem Property.
    I guess this will solve your problem.
    Thanks
    Sarbjeet Singh,

  • Can I change a cross reference display without having to recreate it?

    WHen cross references are to figures on the same page, I let the cross reference point to the paragraph number only ("see View 25"). When it is on another page, I use paragraph number and page ("See View 25 on page 34"). But when my text changes, sometimes text moves, sometimes images move and I need to change the cross reference. It is quite bothersome, I have to rmeove the old one and create a new one, hunting for the cross reference in a list of 150 or so.
    Is there a simpler way? E.g. put the insertion point in the cross reference and than some easy way to select a different appearance?

    Thanks for stepping in, Jan. I'm glad the smart page-reference building blocks in Cross-References Pro can actually do what I hoped it could, to solve this riddle for the original poster. I did a quick test, just to be sure it worked as I expected, and it does! It would be great for Adobe to license your technology and build this into InDesign, along with the rest of the extra-strength cross-reference abilities. (Disclaimer: I'm not connected to DTP Tools other than being a happy user.)
    As to the unwanted space, perhaps a character style in nested and/or GREP style could apply some kind of width adjustment that would reduce the displacement to an absolute minimum.
    Regards,
    Peter
    Peter Gold
    Jan Macuch wrote:
    Hi, sorry for being a little late on this one. Here's a sample of the Cross-Reference PRO format you're looking for is:
    See Figure <paranum/> <pagenum usesectionname="true" forcearabic="true" usepage="true" pagetext="on page #" usethis="true" thistext=" " usenext="true" nexttext="on the next page" useprev="true" prevtext="on the previous page" useopposite="true" oppositetext="on the opposite page"/>
    The trick is that you include the words "on" and "on the" in the page wording definitions, but insert just emptu space for the This Page setting. There's a glitch that you end up with an extra space after the reference, but you can replace the normal space by a hair space (code ^| ) which makes it quite tolerable.
    Jan Macuch
    DTP Tools

  • Creation of Change request with reference to existing change request

    Hi
    I want to do Creation of Change request with reference to existing change request for MDG-F and MDG c/MDG S Is it possible? If yes, How?

    Hi Sanjay,
    No , its not out of box functionality in MDG. Reason being, MDG framework provided some standard API's with the help of which we can do our development with ease.
    Like Governance API                            : IF_USMD_GOV_API
           Convenience Governance API         :IF_USMD_CONV_SOM_GOV_API
           Change Request API Interface:       IF_USMD_CREQUEST_API
    With the help of which you can play around with your data in MDG with the pre-defined methods of it.
    Best Regards,
    Kaustubh

  • Changing the selection screen based on the option in list box option

    Hi Experts,
    I have a list box parameter in my selection screen,
    i have four options and i am changing my selection screen based the option selected.
    see my code below,
    at selection-screen output.
      GS_VRM_VALUES-KEY = '1'.
      GS_VRM_VALUES-TEXT = TEXT-S02.
      APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
      GS_VRM_VALUES-KEY = '2'.
      GS_VRM_VALUES-TEXT = TEXT-S03.
      APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
      GS_VRM_VALUES-KEY = '3'.
      GS_VRM_VALUES-TEXT = TEXT-S04.
      APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
      GS_VRM_VALUES-KEY = '4'.
      GS_VRM_VALUES-TEXT = TEXT-S05.
      APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
      CLEAR: GS_VRM_VALUES.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID                    = 'P_DROP'
          VALUES                = GT_VRM_VALUES
      EXCEPTIONS
        ID_ILLEGAL_NAME       = 1
        OTHERS                = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    LOOP AT SCREEN .
        CASE P_DROP .
          WHEN '1'.
            IF SCREEN-GROUP1 = 'M2' OR
              SCREEN-GROUP1 = 'M3' OR SCREEN-GROUP1 = 'M4'.
              SCREEN-INPUT = 0.
             SCREEN-ACTIVE = 0.
              screen-invisible = 1.
              MODIFY SCREEN.
            ENDIF.
          WHEN '2'.
            IF SCREEN-GROUP1 = 'M3' OR SCREEN-GROUP1 = 'M4'.
              SCREEN-INPUT = 0.
             SCREEN-ACTIVE = 0.
              screen-invisible = 1.
              MODIFY SCREEN.
            ENDIF.
          WHEN '3'.
            IF SCREEN-GROUP1 = 'M2' OR
                SCREEN-GROUP1 = 'M4' .
              SCREEN-INPUT = 0.
             SCREEN-ACTIVE = 0.
              screen-invisible = 1.
              MODIFY SCREEN.
            ENDIF.
          WHEN '4'.
            IF SCREEN-GROUP1 = 'M2' OR
            SCREEN-GROUP1 = 'M3'.
              SCREEN-INPUT = 0.
             SCREEN-ACTIVE = 0.
              screen-invisible = 1.
              MODIFY SCREEN.
            ENDIF.
          WHEN OTHERS.
            IF SCREEN-GROUP1 = 'M2' OR
               SCREEN-GROUP1 = 'M3' OR SCREEN-GROUP1 = 'M4'.
              SCREEN-INPUT = 0.
             SCREEN-ACTIVE = 0.
          screen-invisible = 1.
              MODIFY SCREEN.
            ENDIF.
        ENDCASE.
      ENDLOOP.
    my problem is when i change the option in the list box, the particular modify group ie, the screen is getting changed only after i press enter, So please suggest me how i can change the screen without pressing enter.

    Hi,
    without using VRM_SET_VALUES...you just create one data element by going se11....create one domain for it...now give the values in the "value range" tab....and at the time of declaration just write ..
    PARAMETERS var1 TYPE <your created data element>
                        AS LISTBOX VISIBLE LENGTH 20
                        USER-COMMAND onli
                        DEFAULT <one value>.
    You will get the same effect as list box....and make it mandatory..
    Arunima

  • How change the graph dynamically based on pivot table.

    Hi,
    My Report having pivot table and bar chart. Organization Name column set as pivot table prompts in pivot table.So Organization Name is appear as dropdown list.If i choose the diffrent Organization Names the pivot table data is according to the Organization Name but no changes in chart.How change the Graph dynamically based on pivot table.
    Please help on this.

    ok.I created pivot table with 4 columns and created chart using pivot table chart options but all 4 columns are displaying chart.But I need only 2 column in chart ..unable to edit the only chart in pivot table.Please help on this.Thank you..

  • Howto change property of javabeans based data control?

    Hi,
    I have a swing application which displays a combobox. This combobox is bound to a javabeans based model using ADF.
    The combobox is enabled/disabled based on a value in another combobox, so sometimes the combobox is enabled, sometimes it's not.
    We've currently implemented this using an action listener, which call comboBox.setEnabled(false).
    This works, but when you refresh the iterator binding for the panel, the combobox is always enabled. I assume this is caused by the fact that the adf xml file describing the javabean contains the following attribute: IsUpdatable="true".
    How can i programatically change this attribute? Can i set a property for the jcombobox control binding, or can i change the AttributeDef used by the combobox?
    Thanks,
    Andrej

    How do i programatically change an adf javabeans based control value from editable to not-editable?

  • Functional Module for changing the field Reference Key 2 in Tcode FB02

    HI,
    I have a one requirement to change a field Reference Key2 (XREF2) in transaction FB02. This field appears in FB02 during (refer steps below):
    u2022 In Initial screen after entering the Document Number, Company code &  Fiscal Year then click on u201CEnteru201D
    u2022 In next screen double click on u201CAccount u201C
    u2022 In next screen click on u201CAdditional Datau201D. We will get a pop-up window where the field Reference Key2 (XREF2) is there.
    We want to change this value of this field. Kindly let me know any Function Module available for this or any other suggestion.
    Regards
    Naga

    I don't know any such BAPI/FM (alas, many threads already) so i suggest you to use SHDB to build a batch input. FI_ITEMS_MASS_CHANGE  should not solve your problem.
    Regards

  • How To Change Root Folder Reference for href - anythingslider links?

    How To Change Root Folder reference for href - anythingslider links?
    My root folder in Web Apps>Carousel in admin is set at /carousel/ (http://bestinscotland04.businesscatalyst.com/carousel/slide-2 - as an example) but I want it to link to a specific page at the root level (specifically /scottish-menswear/mens-highland-kilt-outfit).
    I can't find the controls, css, or html file to enable my picture to link to this product page.
    I'm sorry for the amateur question - I've never had formal training and it's always a reverse-engineering situation with me.
    Thank you.

    One way to address this is to use the Virtual Web Host feature.
    I've uploaded a simple application note to help guide you through the steps.
    An alternative would be to create an html at /Web/ which forwards to /Web/Joomla.  Not a great solution, I know.
    I'm sure there is a way to change the setting in a linux configuration file, but I don't know which file that is in.  Maybe some other linux savy community members could help out with that?

  • Common reference based on Item Combination

    Hi,
    I had a scenario where i need to create a unique reference based on Item and org combination.
    Eg:
    Item Org Common
    Item1 A1 001
    Item2 A2 002
    Basesd on Item and Org Combination i need to generate a common reference value. Can some one help me out how to get this.
    Thanks.

    Hi,
    user11186474 wrote:
    Hi Frank,
    The data i will be having is for ever item and org combination i need to create a common reference value.
    For Eg:
    I have ItemA in Ai org for this item and org combination in need to create item a item and org combination..similarly for itemB and A2 org i need to create one more common reference.. this goes on for every item and org combination.
    The output of my table will look like this
    Item Org Reference
    ItemA A1 0001
    ItemB B1 002
    For Every Item and org combination i need to generate a unique reference value.In the above i need to generate a common reference value.So what's wriong with the query I posted earleir?
    If you want leading 0's so that the derived column always has 3 digits, then use TO_CHAR.
    if you want the output to sometimes have 4 digits (like '0001') and sometimes 3 digits (like '002') then use CASE.

  • Calculating reference based sum in variety of tables

    Hello there.
    Can anybody tell me if there is a way to calculate reference based sum in variety of tables?
    For example - I've got a sheet with some tables in it. There are header row and header column in each table. Each header column contains various items and the column next to it contains numeric value for theese items. Some items are repeating throughout the different tables.
    So, I'd like to make a master table that would contain the total value of each repetitive item without using table identifier in the formulas, because the number of tables will vary. Maybe there are some wildcards for this type of cases?

    _Go to "Provide Numbers Feedback" in the "Numbers" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'09
    Yvan KOENIG (from FRANCE mardi 12 août 2008 12:39:25)

  • Change a Global var based on page

    Can I change a global var based on what page I am on.
    For example.

    Hi,
    I do that sort of thing myself - though usually I use this as a pointer to where I need to return to when the user has finished an action on a form page (the form being accessible from multiple pages).
    Create an Application Item called, say, G_RETURN_PAGE.
    On pages 2 and 3, create a Computation that runs Before Header and, using a Static Assignment, sets G_RETURN_PAGE to that page number.
    In my case, I use &G_RETURN_PAGE. in the Page setting on a branch, but you could use :G_RETURN_PAGE in PL/SQL etc
    Andy

  • HT1911 I was able to change my apple ID based on these instructions; however, how do I change it to the new apple id on my iphone 4s?

    I was able to change my apple id based on instructions posted in Apple Support.  But can't figure out how to now change it to the new apple id on my iphone 4s. Can someone point me to instructions, or advise how to change?

    On iphone go to   Settings > Store > tap on your email > tap signout > sign in to new account > ????? > PROFIT

  • Change the condition type based on sales document type

    Dear ALL,
    I have created a condition Zxxx which is a fixed calculation type for the documents created by the upload from external tool to SAP.  I created this condition because external tool is using a 15 place decimal which SAP doesn't allow and if the normal condition type Zyyy is used SAP calculates once in SAP and there are rounding issues.  What the Zxxx condition type does is accept whatever value is sent up from external tool to SAP, regardless of the quantity.  The problem is that whenever they create a credit with reference, in SAP and they want to do a partial credit, the Zxxx doesn't take the partial quantity into consideration and doesn't change the value. 
    Is there a way to force SAP to change the condition type from Zxxx to Zyyy based on sales document type without recalculating the whole document because that would again, cause rounding issues.  We would need to have the calculation done only on quantities changed in the credit memo request .
    please advice me. your inputs are highly appreciated.
    TIA
    KOGI

    Dear ALL,
    someone please help me with this issue. your inputs are higly helpful.
    TIA
    KOGI

  • How to change users' initial page based on a condition

    I'm using SSO on my application, and have two types of users who will be logging on - I want one set (admins) to go straight to one page, and the other set (users) to go to a another page after logging in. These two sets of users are stored in the database, so I can want to use that to check against.
    I get the impression this would be easy enough if my users went via the 101-login page, but as I'm using SSO I don't think they do. I can change the default starting page, with the home link setting in the application's security attributes, but you can only set one of those.
    I don't mind having it all default to one page, and then redirect away from that if the username meets a particular condition, but can't see how I can do that.
    Can anyone suggest how I can work this to achieve what I need?

    Tim,
    First I would create a HOME_PAGE application item. Then I would create an application computation on new instance that sets that item accordingly. something like this:
    with user_table as(
        select 'TIM' user_name, 'ADMIN' user_role from dual
    select case
               when exists(select *
                             from user_table
                            where user_name = :APP_USER
                              and user_role = 'ADMIN')
               then
                  102
               else
                  103
          end
      from user_tableI would make a landing page all people go to. Page 150. On that page i would make a branch before header which references your HOME_PAGE application item.
    Cheers,
    Tyson Jouglet

Maybe you are looking for

  • Zoom Issue in Color 1.5.3

    My opportunities for zooming in on the Color timeline seem to be limited - surely this is not the way it was designed?  Cmd + =/- only works to a small degree, and yet I can't find anything that will zoom me in to create a viewable timeline of much v

  • How do I check to see if a character is NOT contained in a String?

    I am trying to create a program which will read in user inputted text. If the text contains an email address, then the program will output it to screen. However, I also need to put some sort of fall back in there, in case an email address is not cont

  • Server.app: Users button ( + / -) are disabled of a replica server

    Hi everybody, After upgrade the server to 10.9.5 and server app 3.2.1 version, it has been crashing during the importation of users into server app using a text file. At the beginning everything was ok with a text file where there were only one user,

  • Carriage Returns in output

    Hi I am trying to read an Excel file and display output but all I get is a load of carriage return characters (hollow squares) in the output. It is ok reading .txt files. Is there something I need to include when reading .csv files? If so what would

  • Charging and using the Ipod at the same time

    I have a MAC and my Ipod is formatted for MAC. While the Ipod is plugged in to the MAC with the USB cable, I can eject it and use the Ipod while it is charging. At work, I plug the Ipod in to a Windows machine. It mounts although it is not formatted