Normalize a file path/directory: /// /// /// Normalizes the path, meaning that you reduce any unnecessary directory. /// For example, given the value notneeded1/notneeded2/../../hello you would /// return hello. /// /// /// input string /// Normalized string /* * Sample Directory structure * - home * -- documents * -- desktop * -- myMedia * ----- photos * ----- videos * ----- music * -- downloads * /home/myMedia/photos/../../documents -> /home/documents * /home/myMedia/photos/../documents/.. -> /home/myMedia * /home/myMedia/../documents -> /home/documents * ../home -> ../home * home/../../final -> ../final * /home/myMdeia/documents -> /home/myMdeia/documents * Case 1: * C:\ [current working directory] * cd hello [command operating on cwd] * C:\hello [final path] * Case 2: * C:\ [current working directory] * cd notneeded1/notneeded2/../../hello [command operating on cwd] * C:\hello [final path] */
Desarrollador De Software C Interview Questions
3,497 desarrollador de software c interview questions shared by candidates
some syntax questions and one algorithm question in c++
Q1. Quick sort algorithm and Merge sort algorithm and which one is better on linked list. Q2. Dynamic memory allocation and use cases of malloc, calloc, realloc and new. Q3. Some codes were given on pointers and few questions were asked. Q4. One Problem was given which required topological sort approach.
Find LCA of 2 nodes in a given binary tree, cycle detection in a linked list.
Explain pillars of oops in detail.
What are Virtual functions and friend functions.
Implement the Singleton design pattern.
1. About project we worked on earlier 2.oops concept 3. .net core questions 4.sql basics
Difference between class and structure
1. solve very common c++ proboems
Viewing 3421 - 3430 interview questions