5 Replies - 1923 Views - Last Post: 09 January 2010 - 08:10 PM Rate Topic: -----

#1 MyRedz  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 05-October 08

Puzzled about Data Structures and Algorithms

Posted 08 January 2010 - 10:32 PM

HI i am quite puzzled now.Hope you can answer my doubts
Is data structure and algorithm analysis in Java similar to THose in C++
Can the codes in Data Structure and Algorithm Analysis in JAVA possibly be converted to Data Structures in C++
if possible how??
Is This A Good Question/Topic? 0
  • +

Replies To: Puzzled about Data Structures and Algorithms

#2 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3120
  • View blog
  • Posts: 19,163
  • Joined: 14-September 07

Re: Puzzled about Data Structures and Algorithms

Posted 08 January 2010 - 10:33 PM

Data structures are language independent. Implementation may differ between languages, but the core concepts remain the same. Stacks, queues, trees, so on and so forth.

Given the syntactical similarities between Java and C++ is is entirely possible (and often quite feasible) to do such conversions. The main difference is memory management and if you're doing such porting it should be a safe assumption that you know how to handle it.
Was This Post Helpful? 0
  • +
  • -

#3 Delta_Echo  Icon User is offline

  • D.I.C Addict

Reputation: 5
  • View blog
  • Posts: 722
  • Joined: 24-October 07

Re: Puzzled about Data Structures and Algorithms

Posted 08 January 2010 - 11:26 PM

Maybe he is refering to language specific emplementations like deque?

this may help: http://www.dreaminco...wtopic10157.htm
Was This Post Helpful? 0
  • +
  • -

#4 MyRedz  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 05-October 08

Re: Puzzled about Data Structures and Algorithms

Posted 09 January 2010 - 01:05 PM

thanks.
My point is I have a a code of Java Data Structure and see some similarities
with c++ data structure so i was thinking of doing an conversion if permits
Any one here can share his experience of JAVA to C++ translation or methods?
Was This Post Helpful? 0
  • +
  • -

#5 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Puzzled about Data Structures and Algorithms

Posted 09 January 2010 - 01:26 PM

You know because of the way Java is (no pointers, huge library, etc.) I personally just start from scratch... I may use the Java code as a reference but that is just about it. Java is NOTHING like C++ and visa versa... they just have similar syntax but under the hood they are completely different.
Was This Post Helpful? 0
  • +
  • -

#6 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6107
  • View blog
  • Posts: 23,659
  • Joined: 23-August 08

Re: Puzzled about Data Structures and Algorithms

Posted 09 January 2010 - 08:10 PM

Maybe you should use this as an opportunity to LEARN what it is you're supposed to be learning, which might actually happen if you take the time and translate from Java to C++ YOURSELF!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1