|
If this is for class, and the instructor has specified the language, not much you can do besides slog through it.
However, if the instructor has NOT specified the language, then you could spice up your studies by trying to implement them in a new language! I'm mostly a C# and JS developer and I've been learning Data Structures on my own, but I'm writing mine in C++.
|
|
|
|
|
Funny, I have the opposite problem. Once I implement what I consider to be "fundamental", I can't bring myself to add gold plating such as a user interface.
Anyway, what initially drew me to data structures was the awesome things you can actually do with them, perhaps that can inspire you too.
|
|
|
|
|
I'd expect a software developer to know what data structure to use in which situation. I've known people who will "just use a vector" with no due consideration to anything else. I think it sucks to work with such careless/lazy people.
If someone doesn't have the common sense to choose an appropriate data structure, they'll not like working with me. If someone didn't know as much to make the right choice from a vector, unordered set, queue, stack, list, etc. then they need to urgently educate themselves.
In short, you don't need to implement every kind of data structure, but you should at least know which one to pick from the standard library.
|
|
|
|
|
Awesome. I think I just needed to find the right instruction source and implementation. I found a book that is now working for me and I'm finding it much more interesting/fun to implement the data structures in C++ than C# or Java, mainly due to how pointers work.
|
|
|
|
|
Good on you for accepting critical feedback and working on it! I don't come across people like you ever so often.
|
|
|
|
|
Thanks. And I appreciate your post. Sometimes I need a kick in the right direction, which is also why I ask these types of questions. I try to follow this advice:
I am the smartest man in Athens because I know that I know nothing. - Socrates
|
|
|
|
|
They make life so much more pleasant.
I would often model them, at least to begin with, after a table row in a database.
It's a handy place to move and store the data around the system as a unit. Also, if you add or removed columns from said tables, you only need to change the definition of the structure to accommodate this (and, of course, handle the new data) - but all their data transport throughout your code still works as before without a change.
And you can build structures of structures - and move major blocks of data about (should the need arise) - yet have each component neatly wrapped by a recognizable name.
Maybe you'd like them better if you thought of them a bit like a record in a table.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
TheOnlyRealTodd wrote: I'd rather spend 5 hours coding and have something to show, rather than re-create an intangible data structure that already exists in the standard library, just for the sake of it (or erm... class).
I think the point of the exercise (or at least would be, if I were teaching a class on data structures) is several. Data structures can be complicated, you have to handle edge cases, consider where your performance issues are, often in tradeoffs between a performant search vs. a performant insert/delete, how do you test not just the simple operations and edge cases, but how do you test performance and memory utilization, etc.
In other words, it's a good exercise to bring to consciousness things that we rarely think about because, as you said, these things already exist, so why rewrite them? But the lessons learned are applicable in general programming, and that's important, IMO.
I also think one of the more fun things about data structures is using (or creating) the right structure for the particular task. When I was working on a multi-threaded solution to solve a complex end-of-life analysis of the switch ring topology in communication satellites, I realized there were times when a canned data structure was great, and other places where I needed a custom data structure of the same information, just organized differently. While maintaining both data structures took more memory, that was irrelevant (the memory usage was not the issue here) but what was relevant was the significant performance improvement by using the right data structure for the particular algorithm.
Marc
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
TheOnlyRealTodd wrote: I'd much rather write unit tests and design patterns!
You lost me there...
|
|
|
|
|
|
I love being at the bottom of the abyss
DURA LEX, SED LEX
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
Yeah, it's a much better place to dwell!
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Vunic wrote: Quite a bunch of my friends know nothing other than C & Assembly.
I need to make friends like this. Seriously. I've had quite a struggle meeting these types of programmers versus web devs. Web dev stuff is everywhere, not so much lower-level. I feel I could learn a lot from these people.
In any event, thanks so much for your insight, it was very helpful! And yes, I meant to say "DS & Algorithms" . My course is simply called Data Structures & Performance, but that is what is really is. Also, Big O and asymptotic notation, and even most of the math I get (and enjoy) pretty well... Its just doing things like crafting up routines to add/remove/replace etc... Data from a structure that can seem a little dry at times. I think it's just a matter of time, but honestly, the advice here has helped a lot and I want to thank everyone for replying!
|
|
|
|
|
must be the most buggy piece of software to have darkened my PC ..... EVER .....
I have spent hours building a small video from last weekends desert camping, and it just constantly crashes, messes up content etc.
I have got to the point where I am exporting the content to final video file, and it screws up the overlays with blank spaces, or flakes out or whatever....
I have had to do machine reboots, restarts, forced closes you name it.
|
|
|
|
|
That's strange. I'm using that version witout any problem...
It works on my machine
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
great.........can I borrow your machine then!
|
|
|
|
|
Sure, just pop around. Bring !
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Can you not come here, a) it is warmer, b) I have beer and c) I'm sure the beer is cheaper than having to buy it over there when I arrive, can't take it with me!
|
|
|
|
|
DaveAuld wrote: c) I'm sure the beer is cheaper than having to buy it over there when I arrive, can't take it with me!
You can bet on it... alcohol is very expensive over there.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
DaveAuld wrote: a) it is warmer
Are you kidding me? That's an adjective I've never heard connected with Scotland before!
Wet, yes! But warm?
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
I'm not in Scotland at the moment, I'm in Qatar! So definitely warmer
|
|
|
|
|
That explains the heat, but what about the beer? Surely you're not allowed to drink alcohol there?
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Non-muslim residents can apply for a license to buy alcohol from the only distribution centre. The application must also be with consent from your employer, and they have to declare your income so that your alcohol allowance/month can be set which works out at around 10% of income. You can also buy pork products from the distribution centre.
There is also booze in many of the major hotels.
So, dry we are not!
|
|
|
|
|
A few months ago, I bought my mum an Android tablet.
Everything was fine until I went round a couple of weeks ago and she said she could no longer connect to the internet. I checked all the settings, turned it off and on again and did all the usual stuff but it still wouldn't connect.
I went upstairs and restarted the router (the router is located in the room above her living room and is pretty much directly above where she tends to sit). It connected without any issues and I thought that everything was okay.
It wasn't.
Whenever she tries to reconnect it just won't work downstairs but if she goes upstairs (in fact anything above half way up the stairs) she can connect and once connected, the connection will hold perfectly well downstairs for however long the tablet stays on but it just will not reconnect from there.
Signal strength doesn't always show 100% but by the same token it never seems to hit a particularly low point (no idea how meaningful those signal-strength displays are but the network seems to be in constant view).
I'm certainly no expert on wi-fi (or the ways of the modern world in general) but it doesn't make any sense to me that a better signal would be required to connect than to maintain a connection. My 'phone can happily connect to her wi-fi from downstairs.
Basically, I'm a bit baffled and my dear old ma not only has to go upstairs to login every time she wants to look up a word on Countdown but also has to deal with the embarrassment that her son who is supposedly "good at computers" can't even get her tablet on-line.
Has anyone ever run into something similar?
Slogans aren't solutions.
|
|
|
|
|
If it is an android device, install the Wifi Analyser app. It will show you the signal levels, channel congestion etc.
downstairs, it is maybe picking up interference, or channel congestion etc.
|
|
|
|