Labels
android
Assembly Language
bash
Beagle Bone Black
c
c++
CL1
competitive programming
compiler
computer vision
data structure
database
dsps
encryption
games
graphs
hacks
java
linux
lisp
MIL
monte carlo algo
MPAL
networking
OOMCPL
osa
perl
pl
PL -3
PL-1
PL-2
PL-4
python
qt
recursive algorithms
Scala
security
sorting
storage
terminal
ubuntu
utilities
Saturday, 28 October 2017
Intermediate Code Generation using Lex & YACC
Code
Generates Three Address, Four Address, Triple Intermediate Code.
Friday, 27 October 2017
8 Queens using BackTracking in Python using JSON file as Input
Input
The input to the program is the position of the first queen which taken from a json file.Tuesday, 24 October 2017
Monday, 23 October 2017
Parser for Sample Language
Creation of Parser for a Sample Language using Lex &Yacc.
Basic Version for Parsing simple c++ code
Basic Version for Parsing simple c++ code
Sunday, 22 October 2017
Saturday, 21 October 2017
Concurrent Quick Sort Class in OpenMP
Q: Design a class for concurrent quicksort in C++.
Decided to use OpenMp since Pthread doesn't work well with classes, not without ton's of efforts.
Decided to use OpenMp since Pthread doesn't work well with classes, not without ton's of efforts.
Friday, 20 October 2017
Recursive & Iterative Binary Search in Scala
Scala
My very first program in Scala. And I don't find Scala close to Java. I am quite used to Java and C++ and rather find the two more close as very as programming is concerned.Scala however is closer to Java since scala code is converted to Java Bytecode and the executed.
Program
I used 2 classes a Binary Search class & a Tester object
. An object is more like a singleton class according to my understanding.
The BinarySearch class has constructor which accepts a sorted array.
It has 2 functions
- A Recursive Binary Search
- An Iterative Binary Search.
Monday, 18 September 2017
Dark Conky Theme
I recently worked on a dark desktop theme for conky, the result was a super cool desktop theme. It is completely modular and consists of a number of widgets whose position can be easily configured using conky manager. I actively make additional commits to this project, add new widgets and fix any bugs that I find.
Screenshot
Saturday, 26 August 2017
Launch Applications Faster :Preload in Linux
Wanna speed up Launch time of Applications in Linux then read on.Preload is a package that enables a service which can preload libraries required for Applications in the Ram. Obviously reading from ram is way more faster than reading from the disk. That's where your system gains up speed and can launch applications faster.
Sunday, 16 July 2017
UVa 1203 - Argus C++ map and priority queue
Question
Solution to this UVa problem by using simple data structures like map and priority queue.Solution
Since priority queue stores data in descending order but we needed ascending order, we simply stored negative instead of positive. Alternatively we might have to write our own comparing function.Friday, 14 July 2017
Thursday, 13 July 2017
Competitive Programing: Vowel Substring
Q: Given a string find all the number of sub-strings which contain all the five vowels at least once.
It is solved in two ways:
It is solved in two ways:
- A slightly more complicated linear scan method
- By generating all the sub-strings and then checking whether or not it satisfies the our requirements. (brute force)
Tuesday, 11 July 2017
UVa 00637 - Booklet Printing
This problem is an adhoc problem that asks to you to design a system to print folding booklets. The problem description and test cases can be found here.
Saturday, 8 July 2017
Record internal speaker audio in Linux
![]() |
| Recording internal audio in Linux |
Sounds perfect, except the fact that it has been already implemented. Meanwhile, through numerous visits to stackoverflow and askUbuntu I finally discovered a cool new way to record audio.
Tuesday, 4 July 2017
Uva 278 - Chess
This problem is one of the best ad-hoc problems I have come across - simple but thought provoking. It asks you to the maximum number of rooks, queens, kings or knights you could place on n*m chess board such that no piece attack another.
Given that 4<=m,n<=10.
Given that 4<=m,n<=10.
Monday, 3 July 2017
Summing the digits of a number in C++
Q: This is a simple ad-hoc problem which asks to sum up the digits of a number repeatedly until the sum is less than 10. We are required to stop the program when input given is 0.
Subscribe to:
Posts (Atom)

