Skip to main content

Posts

Showing posts from 2017

Hacker Rank: 2D Array - DS Solution

I've been trying to solve the puzzles on HackerRank.com lately. This post is just to solve the problem in Arrays section of Hacker Rank

I feel better to solve the problems though. It certainly improves some area in programming language.

As I'm a C# developer the problem is solved using C# as programming language.

Question: https://www.hackerrank.com/challenges/2d-array

And the solution is

Stack implementation using C#

A stack is a data structure.

And the definition as on Wikipedia:
In computer science, a stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed.
Data structures are so simple if you can understand everything in it. They are just another programs which are tied together with small pieces of implementation.

Intellisense in Visual Studio Code not working

I've noticed Visual Studio Code is not showing intellisense though I've done some settings in the editor.

Like someone in this stackoverflow.com post did few changes to his editor but it didn't worked either.

If you are facing the same problem then the cause is that OmniSharp is not installed with your visual studio code.

I didn't do any editor settings, but when I've opened the Visual Studio Code repeatedly I've noticed that OmniSharp package is installed now.



Once it is installed you'll see references to your method names as "0 references" as you can observe from above screenshot

If it is not installed you will only get basic intellisense support with Visual Studio Code (like if, for, while etc).

I doubt why this won't install as and when C# extension is installed. But after restarting the editor for multiple times I've noticed that OmniSharp is installed and the intellisense is working now.