Author Topic: Programming Challenge!!!!  (Read 57189 times)

0 Members and 1 Guest are viewing this topic.

Offline drdrb

  • Super Member
  • *
  • Points: 2688
  • Posts: 1583

    • USIT
    • _
      CSE
    • View Profile
Re: Programming Challenge!!!!
« Reply #165 on: August 01, 2015, 04:38:21 pm »
Also you have to print the actual notes used :D So uske liye correct kar xD  :O)
Eg: if input is 80 print 50 20 10

Offline drdrb

  • Super Member
  • *
  • Points: 2688
  • Posts: 1583

    • USIT
    • _
      CSE
    • View Profile
Re: Programming Challenge!!!!
« Reply #166 on: August 01, 2015, 04:39:00 pm »
Yaay Smart Guy

I was just testing you ..... :clap

Mobile se hu wrna ans de deta..   :lol
koi ni ye upar wala jo modification hai uska kariyo and no cheating  ;-)

Offline pK12

  • Super Member
  • *
  • Points: 1172
  • Posts: 578

    • BVP
    • _
      IT
    • View Profile
Re: Programming Challenge!!!!
« Reply #167 on: August 01, 2015, 10:53:29 pm »
At first i was like nice good logic. But then i remember ye iska code nahi ho sakta  :O)
http://www.geekinterview.com/question_details/88314


Aur secondly it fails with 80 because you bluntly copy pasted  L-)

at first i was going to same as abhi did. anyways give me 5 minutes. let me get back on my system.

Offline Man of Steel

  • College Representatives
  • Sr. Member
  • *
  • Points: 550
  • Posts: 285
  • You know nothing , Jon Snow...
    • _
      AIACTR
    • _
      ECE
    • View Profile
Re: Programming Challenge!!!!
« Reply #168 on: August 01, 2015, 11:01:43 pm »
Coding Question

1. Given a file and an input of 'n' words, return back :
   a. if ALL the 'n' words exist (easy part)
   b. if a) is true, are there multiple         occurrences of ATLEAST one of these words
   c. If b) is true, return the positions (line and word number) of these words where they are spaced closest to each other.
       Or to word it differently -return the  position of these words such that the graph formed when you connect the consecutive words has the lowest weight ( where weight of an edge is the number of words between 2 positions)

E.g-- if the file contents are that of this answer (without this example) and the input words are :  "the" and the string "'n'", the answers are
    a. True
    b. true ( 1 "the" in line 0 and another in part a of the question. 1 "'n'" in the question line and another in part a of the question )
    c. The line number of part a of the question has these 2 words spaced closest to each other.

Offline pK12

  • Super Member
  • *
  • Points: 1172
  • Posts: 578

    • BVP
    • _
      IT
    • View Profile
Re: Programming Challenge!!!!
« Reply #169 on: August 01, 2015, 11:04:48 pm »
Hope you love it


@drdrb


Code:
Only registered users can see contents. Please click here to Register or Login.

Offline drdrb

  • Super Member
  • *
  • Points: 2688
  • Posts: 1583

    • USIT
    • _
      CSE
    • View Profile
Re: Programming Challenge!!!!
« Reply #170 on: August 01, 2015, 11:13:17 pm »
@pK12
nice

Here's what i attempted (pata ni mein har question ko recursion se kyun solve karta hun :P ):
Code:
Only registered users can see contents. Please click here to Register or Login. :|

Offline pK12

  • Super Member
  • *
  • Points: 1172
  • Posts: 578

    • BVP
    • _
      IT
    • View Profile
Re: Programming Challenge!!!!
« Reply #171 on: August 01, 2015, 11:16:31 pm »
@pK12
nice

Here's what i attempted (pata ni mein har question ko recursion se kyun solve karta hun :P ):

 :|

Itne se program ke liye algorithm :P

Chal koi nhi. Lekin recursion vagreh sab bhool jha. ye sab bakvas he. In actual programs recursion karega to function calling overheads bohot ho jayega.

Offline drdrb

  • Super Member
  • *
  • Points: 2688
  • Posts: 1583

    • USIT
    • _
      CSE
    • View Profile
Re: Programming Challenge!!!!
« Reply #172 on: August 01, 2015, 11:25:09 pm »
Itne se program ke liye algorithm :P

Chal koi nhi. Lekin recursion vagreh sab bhool jha. ye sab bakvas he. In actual programs recursion karega to function calling overheads bohot ho jayega.
hmm yeah pata ni interesting lagta hai recursion se solve karna  :-D
but yeah uska ek fayda hai you could permute all the possible solutions agar else if ki jagah sirf if hota  :S

Offline swapnil7

  • Newbie
  • *
  • Points: 1
  • Posts: 1

    • USIT
    • _
      IT
    • View Profile
Re: Programming Challenge!!!!
« Reply #173 on: November 28, 2016, 11:42:01 pm »
At this platform It would be better to give information about coding/programming .
Asking some questions is not a good idea( it will not work in long term) instead of that we should tell people from

where to start coding, from where to learn(<-from net not from books )
Posting some random questions " it will not work"..
If you want some ways to do better coding you have to work consistently.
we have some good sites to code in organised way.
1. a2oj
2.codechef
3.codeforces
4. Hackerrank
I am not mentioning much sites it will confuse you.
For further help you can msg me on fb , just type swpnl7 in your search box.
I am from USICT.
thanks.

[/b]

 

DIRECT X game programming

Started by sarthak9333

Replies: 1
Views: 1357
Last post December 05, 2012, 03:06:32 pm
by SagarDabas
improve your programming...!!!

Started by ab2757

Replies: 14
Views: 5736
Last post August 27, 2013, 08:14:34 pm
by cool98765
programming is frustrating!!

Started by slimshady

Replies: 6
Views: 2989
Last post January 22, 2010, 08:11:14 pm
by ANKITSINGHAL
regarding java programming

Started by Ratika

Replies: 4
Views: 2722
Last post May 14, 2015, 07:17:38 pm
by sagrma
C programming problems

Started by RAYAN FOSTER

Replies: 16
Views: 4132
Last post July 26, 2015, 05:53:38 pm
by Dar3deviL
Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49