Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 438 Weeks Ago, 3 Days Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Programming Posted 09 May 2017 My Price 8.00

Give a recursive algorithm to compute the product of two positive

1. Give a recursive algorithm to compute the product of two positive integers, m and n, using only addition and subtraction.

2. Describe a fast recursive algorithm for reversing a singly linked list L, so that the ordering of the nodes becomes opposite of what it was before.

3. Describe a good algorithm for concatenating two singly linked lists L and M, with header sentinels, into a single list L′ that contains all the nodes of L followed by all the nodes of M.

Answers

(8)
Status NEW Posted 09 May 2017 10:05 AM My Price 8.00

-----------

Attachments

file 1494325372-668485_1_636298614571012852_recursive-program-to-find-multiplcation.docx preview (52 words )
#-----------inc-----------lud-----------e &-----------amp-----------;lt-----------;io-----------str-----------eam-----------&am-----------p;g-----------t; ----------- us-----------ing----------- na-----------mes-----------pac-----------e s-----------td;----------- v-----------oid----------- pr-----------od(-----------int----------- n,-----------int----------- &a-----------mp;-----------amp-----------;co-----------unt-----------,in-----------t &-----------amp-----------;am-----------p;m-----------,in-----------t &-----------amp-----------;am-----------p;p-----------) {----------- ----------- -----------if(-----------cou-----------nt=-----------=m)----------- re-----------tur-----------n; ----------- ----------- p-----------=p+-----------n; ----------- ----------- p-----------rod-----------(n,-----------++c-----------oun-----------t,m-----------,p)-----------; -----------} -----------int----------- ma-----------in(-----------) {----------- ----------- -----------int----------- n,-----------m; ----------- ----------- c-----------in&-----------amp-----------;gt-----------;&a-----------mp;-----------gt;-----------n&a-----------mp;-----------gt;-----------&am-----------p;g-----------t;m-----------; ----------- ----------- in-----------t p-----------=0,-----------q=0-----------; ----------- ----------- pr-----------od(-----------n,q-----------,m,-----------p);----------- ----------- -----------cou-----------t&a-----------mp;-----------lt;-----------&am-----------p;l-----------t;p-----------&am-----------p;l-----------t;&-----------amp-----------;lt-----------;en-----------dl;----------- /-----------/ y-----------our----------- co-----------de -----------goe-----------s h-----------ere----------- r-----------etu-----------rn -----------0; ----------- }-----------
file 1494325374-668485_2_636298614571012852_reverse-a-linked-list.docx preview (170 words )
/-----------/ A----------- si-----------mpl-----------e a-----------nd -----------tai-----------l r-----------ecu-----------rsi-----------ve -----------C++----------- pr-----------ogr-----------am -----------to -----------rev-----------ers-----------e -----------// -----------a l-----------ink-----------ed -----------lis-----------t -----------#in-----------clu-----------de&-----------amp-----------;lt-----------;bi-----------ts/-----------std-----------c++-----------.h&-----------amp-----------;gt-----------; -----------usi-----------ng -----------nam-----------esp-----------ace----------- st-----------d; -----------  ----------- s-----------tru-----------ct -----------nod-----------e -----------{ ----------- Â----------- Â ----------- i-----------nt -----------dat-----------a;Â----------- Â ----------- Â----------- st-----------ruc-----------t n-----------ode----------- *n-----------ext-----------; -----------}; -----------  ----------- v-----------oid----------- re-----------ver-----------seU-----------til-----------(no-----------de -----------*cu-----------rr,----------- no-----------de -----------*pr-----------ev,----------- no-----------de -----------**h-----------ead-----------); -----------  ----------- /-----------/ T-----------his----------- fu-----------nct-----------ion----------- ma-----------inl-----------y c-----------all-----------s r-----------eve-----------rse-----------Uti-----------l()-----------// -----------wit-----------h p-----------rev----------- as----------- NU-----------LL ----------- vo-----------id -----------rev-----------ers-----------e(n-----------ode----------- **-----------hea-----------d) ----------- { -----------  ----------- Â----------- Â -----------if -----------(!h-----------ead-----------) ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- re-----------tur-----------n; -----------  ----------- Â----------- Â -----------rev-----------ers-----------eUt-----------il(-----------*he-----------ad,-----------
file 1494325377-668485_3_636298614571012852_algorithm-for-concatenating-two-linked-lists.docx preview (129 words )
n-----------ode----------- * -----------con-----------cat-----------ena-----------te -----------(no-----------de -----------*he-----------ad1-----------, n-----------ode----------- *h-----------ead-----------2) ----------- { -----------  ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â-----------  n-----------ode----------- *p-----------; ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- if----------- (h-----------ead-----------1==-----------NUL-----------L)Â----------- Â ----------- Â----------- //-----------if -----------the----------- fi-----------rst----------- li-----------nke-----------d l-----------ist----------- is----------- em-----------pty----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- re-----------tur-----------n (-----------hea-----------d2)-----------; ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- if----------- (h-----------ead-----------2==-----------NUL-----------L)Â----------- Â ----------- Â----------- //-----------if -----------sec-----------ond----------- li-----------nke-----------d l-----------ist----------- is----------- em-----------pty----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- re-----------tur-----------n (-----------hea-----------d1)-----------; ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- Â----------- Â ----------- 
Not Rated(0)