Posts

Showing posts from August, 2017
For more Computer Science, Linux, C++ content visit ProgrammerCave
Follow us on Facebook | Instagram | Telegram

Contribute on Paypal

C++: Program to find smallest element is an array which is repeated exactly 'k' times

Image
This is a problem from GeeksForGeeks . I have tried to write different code for the problem. The problem says we have an array of elements . We have to find the smallest element which is repeated exactly k times.

Top 10 Web Sites Every Programmer Should Visit Daily

Image
Computer programming is one of the fastest growing field. If you are a programmer then you can be hired by a top tech company or you can also work as a freelancer and earn decent amount. So the question arises, how to learn to code ? Initially it was very difficult to learn programming. As there was no internet and you have to relay on books or your colleagues’ code. Now you can find tons of material on the internet. You can learn any computer programming language you want. I am going to tell you some sites which you should visit regularly. 

C++: STL Iterators

Image
Iterators are pointer like object w hich are used to p oint at the memory addressess of STL containers. Properties of Iterator  ➧ We can dereference an iterator in order to access the value to which i t refers. That is, if p is an iterator, *p is defined. ➧ We can assign one iterator to another. That is, if p and q are iterators, the expression p = q i s defined.   ➧ We can compare one iterator to another for equality. That is, if p and q are iterators, the expressions p == q and p != q are defined. ➧ We can move an iterator through all the elements of a container. This can be satisfied by defining ++p and p++ for an iterator p .
For more Computer Science, Linux, C++ content visit ProgrammerCave
Follow us on Facebook | Instagram | Telegram

Contribute on Paypal