Thread: Help me out with following programs logic in c ??

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    1

    Help me out with following programs logic in c ??

    Code:
    1.Write a program to get the subsequence of a bit 1 and 0 given in a array of bits.
    
    For example:
    
    array={1,0,1,1,0,1,1}
    
    Output={1,0,1,0}
    
    array={1,1,0,1,0,0,1,1}
    
    Output={1,1,0,1,0,0}
     
    2. given an array of integers divide it into two groups such that sum of
    each group is equal.
    e.g.
    
    input:{1,2,3,6}
    output;{1,2,3} and{6}
    
    input:{1,7,2,8}
    output:{2,7}and{1,8}
    
    input:{1,2,7}
    output:not possible
      
    3. a string is given.
    find if it can be converted into palindrome or not.
    e.g.
    input: tests
    it can be converted into "tsest" which is a palindrome so
    output:true

  2. #2
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Homework Policy. We are not going to do the work for you. Post what you have already done and then ask specific questions.
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. XOR Logic Help
    By Yabssato in forum C Programming
    Replies: 8
    Last Post: 09-27-2011, 01:29 PM
  2. Replies: 1
    Last Post: 11-09-2009, 07:03 AM
  3. Need a logic!
    By ssharish2005 in forum Tech Board
    Replies: 2
    Last Post: 01-31-2008, 10:56 AM
  4. Programs opening programs
    By LinuxPLC in forum C Programming
    Replies: 1
    Last Post: 11-21-2002, 12:50 PM
  5. Pcx? What's the logic????
    By kaygee in forum C++ Programming
    Replies: 1
    Last Post: 01-14-2002, 10:18 AM