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)-----------; -----------Â Â----------- Â -----------Â Â----------- Â -----------Â Â----------- Â -----------Â Â----------- Â -----------Â Â----------- Â ----------- Â----------- Â -----------Â Â----------- Â -----------Â Â----------- Â -----------Â Â----------- Â -----------Â Â----------- Â -----------Â