Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Interview Questions ... Please Answer! [modified]

Interview Questions ... Please Answer! [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
questiondesignalgorithmsdata-structuresregex
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AryaSoft
    wrote on last edited by
    #1

    Can someone please answer the below questions? :confused: Thanks in advance!: ===== 1. How do you ensure data consistency with mulitple threads. 2. How do you implement a single linked with multiple threads accessing and updating the same. What are the different ways to do it. What is best for performance? 3. Write code for inserting into singly linked list, taking into consideration that multiple threads can call the same function concurrently. ======= 1. Implement Singleton design pattern. 2. Update the above code keeping in mind the multiple threads can use this class. 3. And change the solution such a way that we get best performance. 4. Discuss algorithm and write code for reversing the words in a string. 5. Come up with an algorithm for the above problem such a way that we don't use extra space. ============ 1. If there is a string with only characters 'a' & 'b' in it and given a decode pattern as below aaa - 1 aba - 2 bbb - 3 Create a new string from the input string and above pattern in which all the instances of pattern above would be replaced with the appropriate decode value in the new string. For example, if the input string is aaaababbbaa the output would be 123aa. 2. Networking questions. Difference between TCP, UDP and why should one use UDP. 3. What is multicast. 4. How does data send and receive work in UDP. How much data can application send at one shot with UDP and how does it work with TCP?

    C Z T 3 Replies Last reply
    0
    • A AryaSoft

      Can someone please answer the below questions? :confused: Thanks in advance!: ===== 1. How do you ensure data consistency with mulitple threads. 2. How do you implement a single linked with multiple threads accessing and updating the same. What are the different ways to do it. What is best for performance? 3. Write code for inserting into singly linked list, taking into consideration that multiple threads can call the same function concurrently. ======= 1. Implement Singleton design pattern. 2. Update the above code keeping in mind the multiple threads can use this class. 3. And change the solution such a way that we get best performance. 4. Discuss algorithm and write code for reversing the words in a string. 5. Come up with an algorithm for the above problem such a way that we don't use extra space. ============ 1. If there is a string with only characters 'a' & 'b' in it and given a decode pattern as below aaa - 1 aba - 2 bbb - 3 Create a new string from the input string and above pattern in which all the instances of pattern above would be replaced with the appropriate decode value in the new string. For example, if the input string is aaaababbbaa the output would be 123aa. 2. Networking questions. Difference between TCP, UDP and why should one use UDP. 3. What is multicast. 4. How does data send and receive work in UDP. How much data can application send at one shot with UDP and how does it work with TCP?

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      are you applying for this job? Cleek | Image Toolkits | Thumbnail maker

      A 1 Reply Last reply
      0
      • A AryaSoft

        Can someone please answer the below questions? :confused: Thanks in advance!: ===== 1. How do you ensure data consistency with mulitple threads. 2. How do you implement a single linked with multiple threads accessing and updating the same. What are the different ways to do it. What is best for performance? 3. Write code for inserting into singly linked list, taking into consideration that multiple threads can call the same function concurrently. ======= 1. Implement Singleton design pattern. 2. Update the above code keeping in mind the multiple threads can use this class. 3. And change the solution such a way that we get best performance. 4. Discuss algorithm and write code for reversing the words in a string. 5. Come up with an algorithm for the above problem such a way that we don't use extra space. ============ 1. If there is a string with only characters 'a' & 'b' in it and given a decode pattern as below aaa - 1 aba - 2 bbb - 3 Create a new string from the input string and above pattern in which all the instances of pattern above would be replaced with the appropriate decode value in the new string. For example, if the input string is aaaababbbaa the output would be 123aa. 2. Networking questions. Difference between TCP, UDP and why should one use UDP. 3. What is multicast. 4. How does data send and receive work in UDP. How much data can application send at one shot with UDP and how does it work with TCP?

        Z Offline
        Z Offline
        Zac Howland
        wrote on last edited by
        #3

        Are these questions are you being asked in an interview? If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

        1 Reply Last reply
        0
        • C Chris Losinger

          are you applying for this job? Cleek | Image Toolkits | Thumbnail maker

          A Offline
          A Offline
          AryaSoft
          wrote on last edited by
          #4

          No ... I found these questions somewhere on the web!

          Z 1 Reply Last reply
          0
          • A AryaSoft

            No ... I found these questions somewhere on the web!

            Z Offline
            Z Offline
            Zac Howland
            wrote on last edited by
            #5

            These are all very basic questions that anyone who has taken a course or multi-threaded applications and data structures/algorithms would be able to answer without too much of a problem. Since it is unclear whether you are applying for the job yourself, I don't think anyone here will answer them for you (at least not 100%). If you are truly looking for academic purposes, use Google. You won't have trouble finding the answers to any of those questions (although, you won't find them all in 1 place). If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

            1 Reply Last reply
            0
            • A AryaSoft

              Can someone please answer the below questions? :confused: Thanks in advance!: ===== 1. How do you ensure data consistency with mulitple threads. 2. How do you implement a single linked with multiple threads accessing and updating the same. What are the different ways to do it. What is best for performance? 3. Write code for inserting into singly linked list, taking into consideration that multiple threads can call the same function concurrently. ======= 1. Implement Singleton design pattern. 2. Update the above code keeping in mind the multiple threads can use this class. 3. And change the solution such a way that we get best performance. 4. Discuss algorithm and write code for reversing the words in a string. 5. Come up with an algorithm for the above problem such a way that we don't use extra space. ============ 1. If there is a string with only characters 'a' & 'b' in it and given a decode pattern as below aaa - 1 aba - 2 bbb - 3 Create a new string from the input string and above pattern in which all the instances of pattern above would be replaced with the appropriate decode value in the new string. For example, if the input string is aaaababbbaa the output would be 123aa. 2. Networking questions. Difference between TCP, UDP and why should one use UDP. 3. What is multicast. 4. How does data send and receive work in UDP. How much data can application send at one shot with UDP and how does it work with TCP?

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              AryaSoft wrote:

              1. How do you ensure data consistency with mulitple threads.

              By Using Syncronization Object!

              AryaSoft wrote:

              2. How do you implement a single linked with multiple threads accessing and updating the same. What are the different ways to do it. What is best for performance?

              Read About Syncronization Object  HERE[^], Best performance will given (if using under only one process) will be Critical Section

              AryaSoft wrote:

              3. Write code for inserting into singly linked list, taking into consideration that multiple threads can call the same function concurrently.

              Try urself!

              AryaSoft wrote:

              . Networking questions. Difference between TCP, UDP and why should one use UDP.

              AryaSoft wrote:

              3. What is multicast.

              AryaSoft wrote:

              4. How does data send and receive work in UDP. How much data can application send at one shot with UDP and how does it work with TCP?

              Read any networking Book first chapter

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

              A 1 Reply Last reply
              0
              • T ThatsAlok

                AryaSoft wrote:

                1. How do you ensure data consistency with mulitple threads.

                By Using Syncronization Object!

                AryaSoft wrote:

                2. How do you implement a single linked with multiple threads accessing and updating the same. What are the different ways to do it. What is best for performance?

                Read About Syncronization Object  HERE[^], Best performance will given (if using under only one process) will be Critical Section

                AryaSoft wrote:

                3. Write code for inserting into singly linked list, taking into consideration that multiple threads can call the same function concurrently.

                Try urself!

                AryaSoft wrote:

                . Networking questions. Difference between TCP, UDP and why should one use UDP.

                AryaSoft wrote:

                3. What is multicast.

                AryaSoft wrote:

                4. How does data send and receive work in UDP. How much data can application send at one shot with UDP and how does it work with TCP?

                Read any networking Book first chapter

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                A Offline
                A Offline
                AryaSoft
                wrote on last edited by
                #7

                Thanks for the help!

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups